roles/nginx: Only add PHP configuration on vhosts that need it
This commit is contained in:
parent
586ad76d6b
commit
422caec2a7
@ -47,6 +47,7 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% if has_wordpress == True or needs_php == True %}
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
# Zero-day exploit defense.
|
# Zero-day exploit defense.
|
||||||
# http://forum.nginx.org/read.php?2,88845,page=3
|
# http://forum.nginx.org/read.php?2,88845,page=3
|
||||||
@ -88,6 +89,7 @@ server {
|
|||||||
|
|
||||||
include extra-security.conf;
|
include extra-security.conf;
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
include extra-security.conf;
|
include extra-security.conf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user