Added conditional statement on directory index for applications like Laravel

This commit is contained in:
Faris AL-Otaibi 2024-07-13 14:03:35 +03:00
parent b2aafc7c73
commit e86ef2576e

View file

@ -19,7 +19,9 @@
<Directory "{{ vhost.documentroot }}">
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 @@
<Directory "{{ vhost.documentroot }}">
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