Passing / denying PHP requests
Francis Daly
francis at daoine.org
Wed Oct 23 16:49:20 UTC 2013
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 at daoine.org
More information about the nginx
mailing list