On 5/19/2017 3:14 PM, Alex Samad wrote:
>
> On 20 May 2017 at 08:00, <lists@lazygranch.com
> <mailto:lists@lazygranch.com>> wrote:
>
> My experience with deny in nginx is the url isn't hidden
>
>
> So you don't want to just restrict access but you want to send a 404
> not found unless they come from a specific ip address.
"deny" by default will return 403. if you want to return 404 instead
you can do something like the following:
### return 404 for requests to /404.internal
location = /404.internal { internal; }
### send 403 to /404.internal to return 404 code instead
error_page 403 =404 /404.internal;
Of course, if you have a custom 404 page you can use it instead of the
/404.internal, but this is a simple way that doesn't rely on any
additional resources.
Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx