From 586ad76d6b6f7b8cfc702a124cdb43d275546138 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 13 Sep 2016 15:58:40 +0300 Subject: [PATCH] roles/nginx: Only use index.php on hosts that need it Otherwise, use index.html. --- roles/nginx/templates/vhost.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nginx/templates/vhost.conf.j2 b/roles/nginx/templates/vhost.conf.j2 index 2a73298..508c060 100644 --- a/roles/nginx/templates/vhost.conf.j2 +++ b/roles/nginx/templates/vhost.conf.j2 @@ -31,7 +31,7 @@ server { {# will only work if the TLS cert covers the domain + aliases, like example.com and www.example.com #} server_name {{ domain_name }} {{ domain_aliases }}; - index index.php index.html; + index {% if has_wordpress == True or needs_php == True %}index.php{% else %}index.html{% endif %}; access_log /var/log/nginx/{{ domain_name }}-access.log; error_log /var/log/nginx/{{ domain_name }}-error.log;