Francis Daly
October 23, 2013 12:50PM
On Wed, Oct 23, 2013 at 07:30:19AM -0700, Paul N. Pace wrote:

Hi there,

> created the location block, but I'm not so good with regular
> expressions and the block is assembled mostly through copy & paste.

If you don't like regex, don't use regex.

location = /installdirectory/file_a.php {
include global-configs/php.conf;
};
location = /installdirectory/file_b.php {
include global-configs/php.conf;
};
location = /installdirectory/file_c.php {
include global-configs/php.conf;
};

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.

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

f
--
Francis Daly francis@daoine.org

_______________________________________________
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: 258
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