47818fc360
FEATURE: Archlinux support FEATURE: Windows support FEATURE: Enhanced CI/CD FEATURE: modular states BREAKING CHANGE: 'apache.sls' converted to new style 'init.ssl' BREAKING CHANGE: "logrotate.sls" became "config/logrotate.sls" BREAKING CHANGE: "debian_full.sls" became "config/debian_full.sls" BREAKING CHANGE: "flags.sls" became "config/flags.sls" BREAKING CHANGE: "manage_security" became "config/manage_security.sls" BREAKING CHANGE: "mod_*.sls" became "config/mod_*.sls" BREAKING CHANGE: "no_default_host.sls" became "config/no_default_host.sls" BREAKING CHANGE: "own_default_host.sls" became "config/own_default_host.sls" BREAKING CHANGE: "register_site.sls" became "config/register_site.sls" BREAKING CHANGE: "server_status.sls" became "config/server_status.sls" BREAKING CHANGE: "vhosts/" became "config/vhosts/" BREAKING CHANGE: "mod_security/" became "config/mod_security/" NOT-BREAKING CHANGE: 'config.sls' became 'config/init.sls' NOT-BREAKING CHANGE: 'uninstall.sls' symlinked to 'clean.sls'
48 lines
1.6 KiB
Django/Jinja
48 lines
1.6 KiB
Django/Jinja
#
|
|
# This file is managed by Salt! Do not edit by hand!
|
|
#
|
|
|
|
{% if salt['pillar.get']('apache:sites') is mapping %}
|
|
{%- set listen_directives = [] %}
|
|
{%- for id, site in salt['pillar.get']('apache:sites').items() %}
|
|
{%- set interfaces = site.get('interface', '*').split() %}
|
|
{%- set port = site.get('port', 80) %}
|
|
{%- for interface in interfaces %}
|
|
{%- if not site.get('exclude_listen_directive', False) and not port == '*' %}
|
|
{%- set listen_directive = interface ~ ':' ~ port %}
|
|
{%- if listen_directive not in listen_directives %}
|
|
{%- do listen_directives.append(listen_directive) %}
|
|
{%- endif %}
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
{%- endfor %}
|
|
{%- for listen in listen_directives %}
|
|
Listen {{ listen }}
|
|
{%- endfor %}
|
|
{%- else %}
|
|
Listen 80
|
|
|
|
<IfModule mod_ssl.c>
|
|
Listen 443
|
|
</IfModule>
|
|
|
|
<IfModule mod_gnutls.c>
|
|
Listen 443
|
|
</IfModule>
|
|
{%- endif %}
|
|
|
|
{%- if salt['pillar.get']('apache:name_virtual_hosts') is iterable %}
|
|
{%- set name_virtual_host_directives = [] %}
|
|
|
|
{%- for name_virtual_host in salt['pillar.get']('apache:name_virtual_hosts') %}
|
|
{%- set interface = name_virtual_host.get('interface', '*') %}
|
|
{%- set port = name_virtual_host.get('port', 80) %}
|
|
{%- set name_virtual_host_directive = interface ~ ':' ~ port %}
|
|
{%- do name_virtual_host_directives.append(name_virtual_host_directive) %}
|
|
{%- endfor %}
|
|
|
|
{%- for name_virtual_host in name_virtual_host_directives %}
|
|
NameVirtualHost {{ name_virtual_host }}
|
|
{%- endfor %}
|
|
{%- endif -%}
|