From a3c0022d7988eee0ec43d939bced91dee9fec0e1 Mon Sep 17 00:00:00 2001 From: mcarlton00 Date: Thu, 19 Dec 2019 09:06:10 -0500 Subject: [PATCH] feat(server-status): allow remote servers to reach server-status page --- apache/files/server-status.conf.jinja | 10 ++++++++++ pillar.example | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/apache/files/server-status.conf.jinja b/apache/files/server-status.conf.jinja index 15a5bac..34984f8 100644 --- a/apache/files/server-status.conf.jinja +++ b/apache/files/server-status.conf.jinja @@ -2,9 +2,19 @@ SetHandler server-status {%- if apache.version == '2.4' %} Require local +{%- for require_type,values in apache.get('server_status_require', {}).items() %} +{%- for value in values %} + Require {{ require_type }} {{ value }} +{%- endfor %} +{%- endfor %} {%- elif apache.version == '2.2' %} Order deny,allow Deny from all Allow from localhost +{%- for require_type,values in apache.get('server_status_require', {}).items() %} +{%- for value in values %} + Allow from {{ value }} +{%- endfor %} +{%- endfor %} {%- endif %} diff --git a/pillar.example b/pillar.example index 4d1443a..d29efbb 100644 --- a/pillar.example +++ b/pillar.example @@ -385,3 +385,8 @@ apache: SSLProtocol: all -SSLv2 -SSLv3 -TLSv1 SSLHonorCipherOrder: 'On' SSLOptions: "+StrictRequire" + server_status_require: + ip: + - 10.8.8.0/24 + host: + - foo.example.com