Better minimalist config in the vhost

Also install mandatory package libcgi-fast-perl.
This commit is contained in:
Benoît S. 2017-07-20 09:33:22 +02:00
parent 3e1a600fd5
commit c2f6708645
2 changed files with 11 additions and 21 deletions

View file

@ -2,13 +2,20 @@
- name: install packages for Apache and Munin
apt:
name: libapache2-mod-fcgid
name: "{{ item }}"
state: installed
with_items:
- libapache2-mod-fcgid
- libcgi-fast-perl
notify: reload apache
tags:
- apache
- munin
- name: change group for /var/log/munin/
file:
group: www-data
- name: install munin plugins
file:
src: "/etc/munin/plugins/{{ item }}"

View file

@ -47,29 +47,12 @@
Require all denied
Include /etc/apache2/private_ipaddr_whitelist.conf
</Directory>
<Directory /usr/lib/munin/cgi/>
Options -Indexes
Require all denied
Include /etc/apache2/private_ipaddr_whitelist.conf
</Directory>
# Munin cgi
# Ensure we can run (fast)cgi scripts
# munin-cgi-graph, used for zooming on graphs.
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
Options +ExecCGI
<IfModule mod_fcgid.c>
SetHandler fcgid-script
</IfModule>
<IfModule mod_fastcgi.c>
SetHandler fastcgi-script
</IfModule>
<IfModule !mod_fastcgi.c>
<IfModule !mod_fcgid.c>
SetHandler cgi-script
</IfModule>
</IfModule>
Allow from all
Require all denied
Include /etc/apache2/private_ipaddr_whitelist.conf
</Location>
# For CGI Scripts. We need to set Directory directive as ScriptAlias take precedence.