Welcome! Log In Create A New Profile

Advanced

RE: Allow/Deny rules in Location block

All files from this thread

File Name File Size   Posted by Date  
ngxinx.conf 4.9 KB open | download sandeep dubey 01/25/2023 Read message
Reinis Rozitis
January 23, 2023 07:40AM
> I am trying to restrict some Location block in my Nginx configuration to
> specific IPs. Below are the changes I made -
>
> location = /auth {
> }
>
> Here, the deny rule is not working. Users are still able to access the
> page publicly. Am I missing something?

Are you sure that the request is exactly /auth since anything else like /auth/ or /auth/something will land in the first location block without any restrictions defined.
Try to remove the '=' and see if it works then.

rr
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Allow/Deny rules in Location block

sandeep dubey January 23, 2023 04:36AM

Re: Allow/Deny rules in Location block

Ian Hobson January 23, 2023 06:58AM

RE: Allow/Deny rules in Location block

Reinis Rozitis January 23, 2023 07:40AM

Re: Allow/Deny rules in Location block

sandeep dubey January 24, 2023 12:42AM

RE: Allow/Deny rules in Location block

Reinis Rozitis January 24, 2023 11:58AM

Re: Allow/Deny rules in Location block

nanaya January 25, 2023 12:30AM

Re: Allow/Deny rules in Location block

sandeep dubey January 25, 2023 12:56AM

Re: Allow/Deny rules in Location block Attachments

sandeep dubey January 25, 2023 12:56AM

RE: Allow/Deny rules in Location block

Reinis Rozitis January 25, 2023 08:30AM

Re: Allow/Deny rules in Location block

sandeep dubey January 27, 2023 09:02AM

Re: Allow/Deny rules in Location block

sandeep dubey January 24, 2023 12:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 288
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready