Re: Allow/Deny rules in Location block

2023-01-27 Thread sandeep dubey
Thanks Reinis for the response and suggestions. I made the changes and unfortunately couldn't make it work. Later realised that we are running a Nginx Controller in GKE env., So assuming that the restriction changes should be done at controller level and not in the Nginx (not very sure). On Wed,

Re: Allow/Deny rules in Location block

2023-01-24 Thread sandeep dubey
Thanks Daniel for the reply. I have attached my config file for reference in a previous reply. On Wed, Jan 25, 2023 at 10:58 AM nanaya wrote: > Just adding, if it's `location /auth {}`, it'll also match /autha, /authb, > /authsomething/something, not just limited to /auth/*. > > On Wed, Jan 25,

Re: Allow/Deny rules in Location block

2023-01-24 Thread sandeep dubey
I have attached my config file which may help to understand it better. With this change, I am getting "404 - Not Found" error and in log it says [error] 11#11: *49 access forbidden by rule, client: 10.48.11.9, server: _, request: "GET /auth/ HTTP/1.1", host: "my.domain.info", referrer: " https://

Re: Allow/Deny rules in Location block

2023-01-23 Thread sandeep dubey
Thanks Reinis for the reply, There are other locations like /auth, /auth/, /auth/admin, /auth/admin/ and few more which have the same rules. I am trying to restrict access to /auth and /auth/admin which are sensitive for public access. Do you think removing "=" can help in this case? On Mon, Jan

Re: Allow/Deny rules in Location block

2023-01-23 Thread sandeep dubey
t; > Remove them, and check that only the last two lines are > allowed in. > > Then create the two top addresses very carefully, and test. > > 1.2.3.4/8 allows all C level addresses of the format 1.*.*.* in. I think > you need 1.2.3.4/24 which allows all of the format > 1.2.3.*

Allow/Deny rules in Location block

2023-01-23 Thread sandeep dubey
Hello, I am trying to restrict some Location block in my Nginx configuration to specific IPs. Below are the changes I made - Version: nginx:1.21.0 location / { > proxy_pass http://127.0.0.1:8080; > } > location = /auth { > proxy_pass http://127.0.0.1:8080; >