-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
nginx_locations appearing in the wrong location in the config file #1142
Comments
If you set
I do seem to be able to reproduce this problem. FWIW, this (though less in line with the documentation on how to do it, but also supported) seems to also work:
|
It seems like there's some logic in the server manifest that affects the Otherwise, the priority is wrong when calling https://github.com/voxpupuli/puppet-nginx/blob/master/manifests/resource/location.pp#L279-L297 |
Thanks for the suggestion, by including ssl_only: true It worked. My hiera yaml looks like this now:
|
I'm going to close this issue; I'd love to see a better fix for this, but I'm not clear how it could be implemented when calling the locations this way. |
FYI this is the same behavior ( But I did not compare the two in details so I'm not saying that I'm sure it is the very same problem :) |
Hello,
Perhaps something like:
|
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
In the Puppet manifest:
class { 'nginx': }
In the Hiera yaml file:
What are you seeing
In the nginx config file that gets output the locations are appearing above the sever declaration and causing nginx not to start
What behaviour did you expect instead
Locations should be inside the server block
Output log
errors from the puppet run:
systemd[1]: Starting nginx - high performance web server...
nginx[26287]: nginx: [emerg] "location" directive is not allowed here in /etc/nginx/sites-enabled/redirect.conf:2
Any additional information you'd like to impart
The text was updated successfully, but these errors were encountered: