roles/nginx: Only add PHP configuration on vhosts that need it

This commit is contained in:
Alan Orth 2016-09-13 15:59:24 +03:00
parent 586ad76d6b
commit 422caec2a7
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,7 @@ server {
root /usr/share/nginx/html;
}
{% if has_wordpress == True or needs_php == True %}
location ~ [^/]\.php(/|$) {
# Zero-day exploit defense.
# http://forum.nginx.org/read.php?2,88845,page=3
@ -88,6 +89,7 @@ server {
include extra-security.conf;
}
{% endif %}
include extra-security.conf;
}