diff --git a/README.rst b/README.rst index 6f03238f8c8ae162d1979d8326f5fb3d37d7a966..0e8b4b54007f6817fc7c4df306b7199fff8e1a83 100644 --- a/README.rst +++ b/README.rst @@ -198,6 +198,11 @@ of interfaces to bind to. For example, to bind both IPv4 and IPv6: Configures Apache's security.conf options by reassinging them using data from Pillar. +``apache.server_status`` +-------------------------- + +Configures Apache's server_status handler for localhost + ``apache.debian_full`` ---------------------- diff --git a/apache/files/Suse/apache-2.4.config.jinja b/apache/files/Suse/apache-2.4.config.jinja index 310ba7f06d798163001cd84c5d62a156a74da036..b83874f4c1e7613b3d252c754060e781591536ea 100644 --- a/apache/files/Suse/apache-2.4.config.jinja +++ b/apache/files/Suse/apache-2.4.config.jinja @@ -165,7 +165,7 @@ Include /etc/apache2/ssl-global.conf {% if salt['pillar.get']('apache:mod_ssl:manage_tls_defaults', False) -%} Include /etc/apache24/conf.d/tls-defaults.conf -{%- %} +{%- endif %} # global (server-wide) protocol configuration, that is not specific # to any virtual host diff --git a/apache/files/server-status.conf.jinja b/apache/files/server-status.conf.jinja new file mode 100644 index 0000000000000000000000000000000000000000..15a5bac1c7eeb44e492ee92951502246abd8c2c6 --- /dev/null +++ b/apache/files/server-status.conf.jinja @@ -0,0 +1,10 @@ +<Location "/server-status"> + SetHandler server-status +{%- if apache.version == '2.4' %} + Require local +{%- elif apache.version == '2.2' %} + Order deny,allow + Deny from all + Allow from localhost +{%- endif %} +</Location> diff --git a/apache/server_status.sls b/apache/server_status.sls new file mode 100644 index 0000000000000000000000000000000000000000..119fedaa4741ddb78bd5b51f741cbf8301172c24 --- /dev/null +++ b/apache/server_status.sls @@ -0,0 +1,18 @@ +{% from "apache/map.jinja" import apache with context %} + +include: + - apache + - apache.config + +{{apache.confdir}}/server-status{{apache.confext}}: + file.managed: + - source: salt://apache/files/server-status.conf.jinja + - template: jinja + - require: + - pkg: apache + - watch_in: + - module: apache-restart + - require_in: + - module: apache-restart + - module: apache-reload + - service: apache