location /_private {
deny all;
}
location ~ \.php$ {
# Workaround PHP vulnerability:
# http://forum.nginx.org/read.php?2,88845,page=3
try_files $uri =404;
include /etc/nginx/fastcgi_params;
keepalive_timeout 0;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/tmp/php.socket;
}
I would like to deny access to everything, that's in _private
directory.
When I try to access _private/a
, I get 403 error, like supposed to. But when I try to access _private/b.php
, the deny all
part is completely ignored.