Skip to content
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

Strict nginx config validation doesn't allow to generate virtual hosts #25

Closed
mbektimirov opened this issue May 30, 2017 · 6 comments
Closed

Comments

@mbektimirov
Copy link

@martensson I see that you strictly validate nginx config here. The problem is that it is impossible to use nixy for virtual host generation with this approach. Any validation fails with upstream configuration from/etc/nginx/sites-enabled/.... Can you make validation optional for this case?

@martensson
Copy link
Owner

Not sure I understand, are the config files in sites-enabled included in the main nginx.conf? Should be something like include /etc/nginx/sites-enabled/*. In this case they should also be validated.

@mbektimirov
Copy link
Author

I try to use nixy directly for virtual hosts config generation so the validation fails. My nginx_template starts with upstream definitions:

upstream location1 {
  # template
}

upstream location2 {
  # template
}

...

@martensson
Copy link
Owner

I see, and I can see that it can be an issue for these kind of use-cases. I will look into it once I got some time!

@martensson
Copy link
Owner

Sorry for the delay, but you can check this commit: 4935f5f

Its non-breaking and if it looks OK it should not be a problem to push a new release.

@mbektimirov
Copy link
Author

Looks good. Thanks!

@martensson
Copy link
Owner

Added to latest release as well now! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants