apache: server-status only for default vhost

This commit is contained in:
Jérémy Lecour 2017-07-28 15:28:19 -04:00 committed by Jérémy Lecour
parent e90d8ceec3
commit 03aae520e8
3 changed files with 30 additions and 0 deletions

View file

@ -22,3 +22,10 @@ SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!RC4
<Files ~ "\.(inc|bak)$">
Require all denied
</Files>
<IfModule mod_status.c>
ExtendedStatus On
<IfModule mod_proxy.c>
ProxyStatus On
</IfModule>
</IfModule>

View file

@ -66,6 +66,12 @@
tags:
- apache
- name: disable status.conf
file:
dest: /etc/apache2/mods-enabled/status.conf
state: absent
notify: reload apache
- name: Ensure Apache config files are enabled
command: "a2enconf {{ item }}"
register: command_result

View file

@ -49,6 +49,15 @@
<Location /munin_opcache.php>
Require local
</Location>
<IfModule mod_status.c>
<Location /server-status>
SetHandler server-status
include /etc/apache2/private_ipaddr_whitelist.conf
Require local
</Location>
</IfModule>
</VirtualHost>
<IfModule mod_ssl.c>
@ -101,5 +110,13 @@
ErrorLog /var/log/apache2/error.log
LogLevel warn
<IfModule mod_status.c>
<Location /server-status>
SetHandler server-status
include /etc/apache2/private_ipaddr_whitelist.conf
Require local
</Location>
</IfModule>
</VirtualHost>
</IfModule>