Browse Source

Adding exclude_listen_directive option (#151)

* Adding exclude_listen_directive option

* Updating Debian config
tags/v0.37.4
Rob Ruma 8 years ago
parent
commit
d5337836b2
4 changed files with 17 additions and 9 deletions
  1. +5
    -3
      apache/files/Debian/ports-2.2.conf.jinja
  2. +5
    -3
      apache/files/Debian/ports-2.4.conf.jinja
  3. +5
    -3
      apache/files/RedHat/apache-2.4.config.jinja
  4. +2
    -0
      pillar.example

+ 5
- 3
apache/files/Debian/ports-2.2.conf.jinja View File

{%- set interfaces = site.get('interface', '*').split() %} {%- set interfaces = site.get('interface', '*').split() %}
{%- set port = site.get('port', 80) %} {%- set port = site.get('port', 80) %}
{%- for interface in interfaces %} {%- for interface in interfaces %}
{%- set listen_directive = interface ~ ':' ~ port %}
{%- if listen_directive not in listen_directives %}
{%- do listen_directives.append(listen_directive) %}
{%- if not site.get('exclude_listen_directive', False) %}
{%- set listen_directive = interface ~ ':' ~ port %}
{%- if listen_directive not in listen_directives %}
{%- do listen_directives.append(listen_directive) %}
{%- endif %}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- endfor %} {%- endfor %}

+ 5
- 3
apache/files/Debian/ports-2.4.conf.jinja View File

{%- set interfaces = site.get('interface', '*').split() %} {%- set interfaces = site.get('interface', '*').split() %}
{%- set port = site.get('port', 80) %} {%- set port = site.get('port', 80) %}
{%- for interface in interfaces %} {%- for interface in interfaces %}
{%- set listen_directive = interface ~ ':' ~ port %}
{%- if listen_directive not in listen_directives %}
{%- do listen_directives.append(listen_directive) %}
{%- if not site.get('exclude_listen_directive', False) %}
{%- set listen_directive = interface ~ ':' ~ port %}
{%- if listen_directive not in listen_directives %}
{%- do listen_directives.append(listen_directive) %}
{%- endif %}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- endfor %} {%- endfor %}

+ 5
- 3
apache/files/RedHat/apache-2.4.config.jinja View File

{%- set interfaces = site.get('interface', '*').split() %} {%- set interfaces = site.get('interface', '*').split() %}
{%- set port = site.get('port', 80) %} {%- set port = site.get('port', 80) %}
{%- for interface in interfaces %} {%- for interface in interfaces %}
{%- set listen_directive = interface ~ ':' ~ port %}
{%- if listen_directive not in listen_directives %}
{%- do listen_directives.append(listen_directive) %}
{%- if not site.get('exclude_listen_directive', False) %}
{%- set listen_directive = interface ~ ':' ~ port %}
{%- if listen_directive not in listen_directives %}
{%- do listen_directives.append(listen_directive) %}
{%- endif %}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- endfor %} {%- endfor %}

+ 2
- 0
pillar.example View File

interface: '*' interface: '*'
port: '80' port: '80'


exclude_listen_directive: True # Do not add a Listen directive in httpd.conf

ServerName: example.com # uses the unique ID above unless specified ServerName: example.com # uses the unique ID above unless specified
ServerAlias: www.example.com ServerAlias: www.example.com



Loading…
Cancel
Save