diff --git a/public/templates/_php.conf.html b/public/templates/_php.conf.html
index 5d7aab1..4ee09ee 100644
--- a/public/templates/_php.conf.html
+++ b/public/templates/_php.conf.html
@@ -1,7 +1,7 @@
-# index
+# index
index {{ data.index_html ? 'index.html ' : '' }}index.php;
-# handle .php
+# handle .php
location ~ \.php$ {
include _php_fastcgi.conf;
diff --git a/public/templates/example.com.conf.html b/public/templates/example.com.conf.html
index b3b40c7..4289a7e 100644
--- a/public/templates/example.com.conf.html
+++ b/public/templates/example.com.conf.html
@@ -9,7 +9,10 @@
ssl_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ data.domain }}/privkey.pem;
- ssl_trusted_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
+ ssl_trusted_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
+
+ # index
+ index {{ data.index_html ? 'index.html ' : '' }}index.php;
# $url{{ data.index_html ? ', index.html' : '' }}{{ data.php !== 'off' && data.index_php ? ', index.php' : '' }}
location / {
@@ -105,7 +108,10 @@ server {
server_name {{ !data.non_www ? 'www.' : '' }}{{ data.domain }};
set $base /var/www/{{ data.domain }};
root $base{{ data.document_root }};
- root /var/www/{{ data.domain }}{{ data.document_root }};
+ root /var/www/{{ data.domain }}{{ data.document_root }};
+
+ # index
+ index {{ data.index_html ? 'index.html ' : '' }}index.php;
# $url{{ data.index_html ? ', index.html' : '' }}{{ data.php !== 'off' && data.index_php ? ', index.php' : '' }}
location / {