Skip to content

Commit 68b9e2f

Browse files
committed
Disabled Directory Indexing by default.
1 parent 4377745 commit 68b9e2f

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

playbooks/roles/web/templates/etc/apache2/vhost-000-default.conf.j2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@
1515
ServerAdmin webmaster@foo.org
1616
DocumentRoot /var/www/html
1717

18+
<Directory /var/www/html/>
19+
Options FollowSymLinks
20+
AllowOverride All
21+
# Apache 2.4 only syntax, see: http://httpd.apache.org/docs/2.4/upgrading.html
22+
# Require all granted
23+
Order allow,deny
24+
Allow from all
25+
</Directory>
26+
1827
# Apache2 server-stats on http://localhost:8080/st
1928
<Location /server-status>
2029
SetHandler server-status

playbooks/roles/web/templates/etc/apache2/vhost-dev-laravel.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
DocumentRoot /var/www/vhosts/{{ item.key }}/public
1717

1818
<Directory /var/www/vhosts/{{ item.key }}/>
19-
Options Indexes FollowSymLinks
19+
Options FollowSymLinks
2020
AllowOverride All
2121
# Apache 2.4 only syntax, see: http://httpd.apache.org/docs/2.4/upgrading.html
2222
# Require all granted

playbooks/roles/web/templates/etc/apache2/vhost-dev-wp_bedrock.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
ServerName {{ item.value.servername }}
88
{% if item.value.serveralias.0 is defined %}
9-
{% for item in item.value.serveralias %}
10-
ServerAlias {{ item }}
9+
{% for item in item.value.serveralias %}
10+
ServerAlias {{ item }}
1111
{% endfor %}
1212
{% endif %}
1313

@@ -16,7 +16,7 @@
1616
DocumentRoot /var/www/vhosts/{{ item.key }}/web
1717

1818
<Directory /var/www/vhosts/{{ item.key }}/>
19-
Options Indexes FollowSymLinks
19+
Options FollowSymLinks
2020
AllowOverride All
2121
# Apache 2.4 only syntax, see: http://httpd.apache.org/docs/2.4/upgrading.html
2222
# Require all granted

playbooks/roles/web/templates/etc/apache2/vhost-prod-laravel.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
ServerName {{ item.value.servername }}
88
{% if item.value.serveralias.0 is defined %}
9-
{% for item in item.value.serveralias %}
10-
ServerAlias {{ item }}
9+
{% for item in item.value.serveralias %}
10+
ServerAlias {{ item }}
1111
{% endfor %}
1212
{% endif %}
1313

@@ -16,7 +16,7 @@
1616
DocumentRoot /var/www/vhosts/{{ item.key }}/current/public
1717

1818
<Directory /var/www/vhosts/{{ item.key }}/>
19-
Options Indexes FollowSymLinks
19+
Options FollowSymLinks
2020
AllowOverride All
2121
# Apache 2.4 only syntax, see: http://httpd.apache.org/docs/2.4/upgrading.html
2222
# Require all granted

playbooks/roles/web/templates/etc/apache2/vhost-prod-wp_bedrock.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
ServerName {{ item.value.servername }}
88
{% if item.value.serveralias.0 is defined %}
9-
{% for item in item.value.serveralias %}
10-
ServerAlias {{ item }}
9+
{% for item in item.value.serveralias %}
10+
ServerAlias {{ item }}
1111
{% endfor %}
1212
{% endif %}
1313

@@ -16,7 +16,7 @@
1616
DocumentRoot /var/www/vhosts/{{ item.key }}/current/web
1717

1818
<Directory /var/www/vhosts/{{ item.key }}/>
19-
Options Indexes FollowSymLinks
19+
Options FollowSymLinks
2020
AllowOverride All
2121
# Apache 2.4 only syntax, see: http://httpd.apache.org/docs/2.4/upgrading.html
2222
# Require all granted

playbooks/roles/web/templates/etc/apache2/vhost-stage-wp_bedrock.conf.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
ServerName {{ item.value.servername }}
88
{% if item.value.serveralias.0 is defined %}
9-
{% for item in item.value.serveralias %}
10-
ServerAlias {{ item }}
9+
{% for item in item.value.serveralias %}
10+
ServerAlias {{ item }}
1111
{% endfor %}
1212
{% endif %}
1313

@@ -16,7 +16,7 @@
1616
DocumentRoot /var/www/vhosts/{{ item.key }}/current/web
1717

1818
<Directory /var/www/vhosts/{{ item.key }}/>
19-
Options Indexes FollowSymLinks
19+
Options FollowSymLinks
2020
AllowOverride All
2121
# Apache 2.4 only syntax, see: http://httpd.apache.org/docs/2.4/upgrading.html
2222
# Require all granted

0 commit comments

Comments
 (0)