Ver código fonte

add server_status state (#250)

Add server_status state to create a default server_status handler for localhost
tags/v0.37.4
Niels Abspoel 6 anos atrás
pai
commit
dccfdf7962
Nenhuma conta vinculada ao e-mail do autor do commit
4 arquivos alterados com 34 adições e 1 exclusões
  1. +5
    -0
      README.rst
  2. +1
    -1
      apache/files/Suse/apache-2.4.config.jinja
  3. +10
    -0
      apache/files/server-status.conf.jinja
  4. +18
    -0
      apache/server_status.sls

+ 5
- 0
README.rst Ver arquivo

@@ -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``
----------------------


+ 1
- 1
apache/files/Suse/apache-2.4.config.jinja Ver arquivo

@@ -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

+ 10
- 0
apache/files/server-status.conf.jinja Ver arquivo

@@ -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>

+ 18
- 0
apache/server_status.sls Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar