-
-
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
Cannot deny access via location #741
Comments
I was under the impression that that's what
|
well there a location_deny and location_allow setting on nginx::resource::location, so it feals kind of counter-intuitive having to resort back to using location_custom_cfg. (Which I'm currently using, since there is no other way) This warning should either be extended to check location_deny, location_allow or be removed all together and let nginx complain about invalid configurations. |
You're right, doesn't seem to let you create a location resource without one of those things.
I'm not sure what the ramifications would be of totally dropping the check in line 352 of |
Would adding The following works for me in a very quick test, and also has the benefit of being a tiny bit shorter and easier to read (IMHO):
|
I've created a PR that suggests a possible fix for this. |
I added try_files in the PR above as well. I am sure there are other cases where www_root is being inherited, or for other reasons, none of these things need to be in the block... for now, I'm going to take the conservative path in terms of changing the code, but I do think there's a case to be made for removing this check entirely. |
I think the merged PR (which is in the latest release) will fix this. Please test if possible. |
…on blocks when other attributes aren't present (issue voxpupuli#741, replaces PR voxpupuli#596, h/t to vladpanainte) add $try_files as well
…on blocks when other attributes aren't present (issue voxpupuli#741, replaces PR voxpupuli#596, h/t to vladpanainte) add $try_files as well
The following location (Deny access to .htaccess/.htpasswd files on nginx reverse proxy) does not work:
This location gets rejected by: manifests/resource/location.pp:325
Website gets deployed and kept in sync on proxies and nginx loadbalancer via git, so removing htaccess on the loadbalancer is not a (good) solution.
The text was updated successfully, but these errors were encountered: