October 23, 2013 02:34PM
Thank you, Francis.

On Wed, Oct 23, 2013 at 9:49 AM, Francis Daly <francis@daoine.org> wrote:
> If you don't like regex, don't use regex.
>
> You probably want another location{} to "deny", and that might be
> "location ~ php$ {}", or it might be that nested inside
>
> location ^~ /installdirectory/ {}
>
> depending on what else you want in the server config.

"location ~ php$ { deny all; }" does not deny access to any php files,
even when nested in "location ^~ /installdirectory/ {}". The previous
configuration "location ~* installdirectory/.*\.php$ { deny all; }"
did block access to all php files. The ".*\." - is that why one works
and the other doesn't?

> http://nginx.org/r/location for how the one location{} is chosen to
> handle a request.

I read through the nginx.org explanation of the location directive,
but it isn't helping me with understanding how to build the deny
statement.

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

Passing / denying PHP requests

openletter October 23, 2013 10:32AM

Re: Passing / denying PHP requests

Francis Daly October 23, 2013 12:50PM

Re: Passing / denying PHP requests

openletter October 23, 2013 02:34PM

Re: Passing / denying PHP requests

Francis Daly October 23, 2013 02:42PM

Re: Passing / denying PHP requests

openletter October 25, 2013 05:46PM

Re: Passing / denying PHP requests

Francis Daly October 26, 2013 08:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 240
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