ba2368907d
* remove -ng stuff * remove ng from template * remove -ng from readme * manage listen directive with disabled vhosts * add json filter * remove hardcoded path
43 lines
1.2 KiB
Django/Jinja
43 lines
1.2 KiB
Django/Jinja
#
|
|
# This file is managed by Salt! Do not edit by hand!
|
|
#
|
|
{%- from "apache/map.jinja" import apache with context %}
|
|
{%- import_yaml "apache/hardening-values.yaml" as hardening_values %}
|
|
{%- from "apache/lib.sls" import directives_output, container_output with context %}
|
|
|
|
{%- set list_interfaces_ports = [] %}
|
|
{%- for name, vhost in salt['pillar.get']('apache:VirtualHost', {}).items() %}
|
|
{%- if not vhost.get('absent', False) %}
|
|
{%- set items = vhost.item.split() %}
|
|
{%- for item in items if item not in list_interfaces_ports %}
|
|
{%- do list_interfaces_ports.append(item) %}
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
|
|
{%- for item in list_interfaces_ports %}
|
|
Listen {{ item }}
|
|
{% else %}
|
|
Listen *:80
|
|
{%- endfor %}
|
|
|
|
{{ directives_output(server_config, 0) }}
|
|
|
|
Include conf.modules.d/*.conf
|
|
|
|
User {{ apache.user }}
|
|
Group {{ apache.group }}
|
|
|
|
|
|
{%- for container_name, container_data_list in server_config.get('containers', {}).items() %}
|
|
{%- for container_data in container_data_list %}
|
|
{{ container_output(container_name, container_data) }}
|
|
{%- endfor %}
|
|
{%- endfor %}
|
|
|
|
|
|
IncludeOptional {{ apache.confdir }}/*.conf
|
|
{%- if apache.vhostdir != apache.confdir %}
|
|
IncludeOptional {{ apache.vhostdir }}/*.conf
|
|
{%- endif %}
|