-
-
Notifications
You must be signed in to change notification settings - Fork 883
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
invalid config generated when ssl is false and listen_port == ssl_port #648
Comments
I have this in my config:
And i am still getting the bug, so it's not related to ssl => true parameter. |
Bug reproduced using version 0.2.6 of the module and the above configuration. |
Even downgrading to 0.0.10 produces the same config file with the "location" directives above the "server" block. I think the problem is related to defining locations that point to ssl-enabled vhosts. When the configuration is defined so that there are both ssl and plain servers($ssl_port != $listen_port), the locations will be generated in the plain server block, above the ssl-enabled server block. When $ssl_port == $listen_port, the plain part is simply removed, but the "location" directives remain in the same spot as before, above the ssl-enabled server block, outside of any server block. |
I am running into this as well. |
I was able to resolve this as you need to have
on the location as well as the vhost. I noticed that this is also in the documentation but I would recommend that the documentation express it a little clearer. |
Upvoting @tarcinil , this isn't clear in the docs... |
I have run into this as well. |
Is anyone willing to contribute a PR for this, and / or do some functional testing to a proposed fix? |
Also, can someone test whether this still happens with most recent release (0.5.0)? |
ps - As of now, I think lines 122-132 in the README do sort of explain this. |
I think a warning should be given now: |
in
vhost.pp
, when$ssl
isfalse
and$listen_port == $ssl_port
(which is a not so logical config, albeit a not illegal one), no header and footer fragment are defined for the vhost file, thus generating an invalid config file.I think a fix would be to add
and not $ssl
as a guard in theif
condition, i.e. changeto
The text was updated successfully, but these errors were encountered: