From e86ef2576eb52889d58233516c6841a9dbde8e12 Mon Sep 17 00:00:00 2001 From: Faris AL-Otaibi Date: Sat, 13 Jul 2024 14:03:35 +0300 Subject: [PATCH] Added conditional statement on directory index for applications like Laravel --- templates/vhosts.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/vhosts.conf.j2 b/templates/vhosts.conf.j2 index 882003c..c6de6c9 100644 --- a/templates/vhosts.conf.j2 +++ b/templates/vhosts.conf.j2 @@ -19,7 +19,9 @@ AllowOverride {{ vhost.allow_override | default(apache_allow_override) }} Options {{ vhost.options | default(apache_options) }} + {% if vhost.directory_index is defined %} DirectoryIndex {{ vhost.directory_index | default(apache_directory_index) }} + {% endif %} {% if apache_vhosts_version == "2.2" %} Order allow,deny Allow from all @@ -89,7 +91,9 @@ AllowOverride {{ vhost.allow_override | default(apache_allow_override) }} Options {{ vhost.options | default(apache_options) }} + {% if vhost.directory_index is defined %} DirectoryIndex {{ vhost.directory_index | default(apache_directory_index) }} + {% endif %} {% if apache_vhosts_version == "2.2" %} Order allow,deny Allow from all