apache-formula/apache/files/server-status.conf.jinja
2020-07-19 09:26:39 -03:00

25 lines
802 B
Django/Jinja

########################################################################
# File managed by Salt at <{{ source }}>.
# Your changes will be overwritten.
########################################################################
<Location "/server-status">
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 %}
</Location>