From c2f67086453ef0e6d42969180624b8b4f6aaa126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S=C3=89RIE?= Date: Thu, 20 Jul 2017 09:33:22 +0200 Subject: [PATCH] Better minimalist config in the vhost Also install mandatory package libcgi-fast-perl. --- apache/tasks/munin.yml | 9 ++++++++- apache/templates/evolinux-default.conf.j2 | 23 +++-------------------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/apache/tasks/munin.yml b/apache/tasks/munin.yml index ce560868..2850b101 100644 --- a/apache/tasks/munin.yml +++ b/apache/tasks/munin.yml @@ -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 }}" diff --git a/apache/templates/evolinux-default.conf.j2 b/apache/templates/evolinux-default.conf.j2 index 36ae65ad..105edeb1 100644 --- a/apache/templates/evolinux-default.conf.j2 +++ b/apache/templates/evolinux-default.conf.j2 @@ -47,29 +47,12 @@ Require all denied Include /etc/apache2/private_ipaddr_whitelist.conf - - Options -Indexes - Require all denied - Include /etc/apache2/private_ipaddr_whitelist.conf - - - # 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 Options +ExecCGI - - SetHandler fcgid-script - - - SetHandler fastcgi-script - - - - SetHandler cgi-script - - - Allow from all + Require all denied + Include /etc/apache2/private_ipaddr_whitelist.conf # For CGI Scripts. We need to set Directory directive as ScriptAlias take precedence.