You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nginx: [emerg] "location" directive is not allowed here in /etc/nginx/sites-enabled/example.mydomain.com.conf:2
Oct 27 13:49:12 nginx systemd[1]: nginx.service: control process exited, code=exited status=1
Is the server lower in the config file? That's what happens to me. Haven't found out what the exact cause is, but if I do something in my configs, it generates the location parts before it puts the server part.
@danquack You should set ssl => true if you use listen_port => 443. You have probably seen the warning 'nginx: ssl must be true if listen_port is the same as ssl_port' while applying manifest. Normal server stanza is not produced since the port is 443 because in such case ssl-enabled server stanza is expected but it also is not generated since you omitted ssl => true
@dutchwhizzman I hit the same issue and found out that location requires ssl => true as well if the server uses it. It influences on how priority for concat::fragment is calculated. non ssl stuff goes first in config and location without ssl specified appears before server with ssl. I assume this is exactly your case, isn't it?
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
What behaviour did you expect instead
the config not to error
Any additional information you'd like to impart
It appears the
server {}
directive is missing in the config.The text was updated successfully, but these errors were encountered: