From 8e618ce70ade2b9657ba2acda5e1a56a918a9cd5 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 25 Apr 2019 17:12:13 +0200 Subject: [PATCH] apache/nginx: add server status suffix in VHost if missing --- CHANGELOG.md | 2 ++ apache/tasks/server_status.yml | 7 +++++++ nginx/tasks/server_status.yml | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08ee7418..becf1234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ The **patch** part changes incrementally at each release. ## [Unreleased] ### Added +* apache: add server status suffix in VHost if missing +* nginx: add server status suffix in VHost if missing ### Changed * evocheck : version 19.04 from upstream diff --git a/apache/tasks/server_status.yml b/apache/tasks/server_status.yml index 80dbe590..4b662c36 100644 --- a/apache/tasks/server_status.yml +++ b/apache/tasks/server_status.yml @@ -40,6 +40,13 @@ regexp: '__SERVERSTATUS_SUFFIX__' replace: "{{ apache_serverstatus_suffix }}" +- name: add server-status suffix in default VHost + replace: + dest: /etc/apache2/sites-available/000-evolinux-default.conf + regexp: '' + replace: '' + notify: reload apache + - name: Munin configuration has a section for apache lineinfile: dest: /etc/munin/plugin-conf.d/munin-node diff --git a/nginx/tasks/server_status.yml b/nginx/tasks/server_status.yml index 7e84c1e4..6d710fe3 100644 --- a/nginx/tasks/server_status.yml +++ b/nginx/tasks/server_status.yml @@ -40,3 +40,10 @@ dest: /var/www/index.html regexp: '__SERVERSTATUS_SUFFIX__' replace: "{{ nginx_serverstatus_suffix }}" + +- name: add server-status suffix in default VHost + replace: + dest: /etc/nginx/sites-available/evolinux-default.conf + regexp: 'location /nginx_status {' + replace: 'location /nginx_status-{{ nginx_serverstatus_suffix }} {' + notify: reload nginx