-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for nginx.conf
files
#100
Comments
Guys, let me try this one, please ;) Thanks ! |
Absolutely! Assigned it to you |
@kehoecj do you have an idea how to check for the nginx.conf file validity with gonginx ? I've tried to use it this way:
but the results are not 100% correct. For example I used a config which was valid and I removed the closing bracket on its "server" block definition but it parsed happily without any issue. Thanks beforehand for any ideas. |
Haven't used the library before - just saw it as a potential option. Can you post the |
The mentioned server block begins at line 84 and is intentionally not closed. This is how it looks like:
This is how it ends if you check it with nginx -t:
|
@onlineque Created an issue in the gonginx project with your findings and if this is a bug, expected behavior, or if there is a different way to do what we're trying to do. |
@onlineque The library maintainer released an update: tufanbarisyildirim/gonginx#31 (comment). Can you try it out and see if it addresses the issue you found? |
Thanks, sure ! |
hi @onlineque just to clarify, latest release (https://github.com/tufanbarisyildirim/gonginx/releases/tag/0.0.1) does not contain those changes, it was just to freeze the current version for people who already use it. you will either need to clone and use a replace directive in your go.mod or I can release a version for you, just let me know if you need a release. |
Description
Add support for
nginx.conf
validation. There is a go nginx config parser we should be able to use to perform the syntax validation. We'd have to lock it in to only detecting files namednginx.conf
or some kind of wildcard like*.nginx.conf
until we can implement some parts of #5The text was updated successfully, but these errors were encountered: