-
-
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
Can't have more than 1 password protected location #572
Comments
@lukaszkorecki I have opened PR #603 to fix this. To your point
I agree, but there's a legacy in this module of copying configuration files from other locations to put under the nginx config directory. I plan to change things for the SSL files so they're not copied around, but may expand scope to cover all files that aren't generated by this module itself. Makes for simpler code and less confusion I think. |
@3flex Sounds good. I completely understand the original approach btw. Thanks! |
I looked more closely at the code, and it turns out that the module copies the file to So to fix your issue all that's required is to stop creating that new file. Everything else will continue to work as-is. I'll create a new PR soon. |
I would remove parameters auth_basic and auth_basic_user_file. There is no real value in having those two parameters. Just increased complexity. The same could be achieved using parameter location_custom_cfg. Here is hiera example:
|
tl;dr I want to have more than one application served from
/
via nginx with basic auth on different ports. At the moment it doesn't seem to be possible.Details
Given this setup:
I'm getting an error saying that
File[/etc/nginx/__htpasswd]
is being created twice. Of course puppet doesn't like that.The problematic line is here: https://github.com/jfryman/puppet-nginx/blob/a19cb94f2398d0b9609a04db2ec9a0071c565004/manifests/resource/location.pp#L381
Basically location of
/
gets escaped as_
Seems like the easiest fix would be to just use the path to original password file and use that in generated nginx config.
Is there a reason why it's done this way? Or am I misunderstanding the usage of the resources?
The text was updated successfully, but these errors were encountered: