roles/nginx: Update location regex for PHP scripts

Just use the same one as the Nginx wiki and some other resources.

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-02-26 16:40:38 +03:00
parent 55fddf03b3
commit 29f7a76545
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -44,7 +44,7 @@ server {
root /usr/share/nginx/html;
}
location ~ \.php$ {
location ~ [^/]\.php(/|$) {
# Zero-day exploit defense.
# http://forum.nginx.org/read.php?2,88845,page=3
# Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.