<div dir="ltr"><div>Thanks Reinis for the reply,</div><div><br></div><div>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? <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 23, 2023 at 6:08 PM Reinis Rozitis <<a href="mailto:r@roze.lv">r@roze.lv</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> I am trying to restrict some Location block in my Nginx configuration to <br>
> specific IPs. Below are the changes I made -<br>
> <br>
> location = /auth {<br>
> }<br>
> <br>
> Here, the deny rule is not working. Users are still able to access the <br>
> page publicly. Am I missing something?<br>
<br>
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.<br>
Try to remove the '=' and see if it works then.<br>
<br>
rr<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="https://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">https://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Regards,<div>Sandeep</div></div></div>