Allow global directives to be added to apache config
This commit is contained in:
parent
e10b2f59d1
commit
2557d3d1c8
@ -42,3 +42,17 @@ include:
|
|||||||
- watch_in:
|
- watch_in:
|
||||||
- service: apache
|
- service: apache
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if grains['os_family']=="Suse" %}
|
||||||
|
/etc/apache2/sysconfig.d/global.conf:
|
||||||
|
file.managed:
|
||||||
|
- template: jinja
|
||||||
|
- source:
|
||||||
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/global.config.jinja
|
||||||
|
- require:
|
||||||
|
- pkg: apache
|
||||||
|
- watch_in:
|
||||||
|
- service: apache
|
||||||
|
- context:
|
||||||
|
apache: {{ apache }}
|
||||||
|
{% endif %}
|
||||||
|
@ -416,6 +416,10 @@ AddDefaultCharset UTF-8
|
|||||||
#EnableMMAP off
|
#EnableMMAP off
|
||||||
EnableSendfile on
|
EnableSendfile on
|
||||||
|
|
||||||
|
{%- for directive, dvalue in salt['pillar.get']('apache:global', {}).items() %}
|
||||||
|
{{ directive }} {{ dvalue }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
# Supplemental configuration
|
# Supplemental configuration
|
||||||
#
|
#
|
||||||
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
||||||
|
@ -350,6 +350,10 @@ AddDefaultCharset UTF-8
|
|||||||
#EnableMMAP off
|
#EnableMMAP off
|
||||||
EnableSendfile on
|
EnableSendfile on
|
||||||
|
|
||||||
|
{%- for directive, dvalue in salt['pillar.get']('apache:global', {}).items() %}
|
||||||
|
{{ directive }} {{ dvalue }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
# Supplemental configuration
|
# Supplemental configuration
|
||||||
#
|
#
|
||||||
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
# Load config files in the "/etc/httpd/conf.d" directory, if any.
|
||||||
|
4
apache/files/Suse/global.config.jinja
Normal file
4
apache/files/Suse/global.config.jinja
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{%- for directive, dvalue in salt['pillar.get']('apache:global', {}).items() %}
|
||||||
|
{{ directive }} {{ dvalue }}
|
||||||
|
{%- endfor %}
|
||||||
|
|
@ -18,6 +18,11 @@ apache:
|
|||||||
# ``apache.mod_wsgi`` formula additional configuration:
|
# ``apache.mod_wsgi`` formula additional configuration:
|
||||||
mod_wsgi: mod_wsgi
|
mod_wsgi: mod_wsgi
|
||||||
|
|
||||||
|
global:
|
||||||
|
# global apache directives
|
||||||
|
AllowEncodedSlashes: "On"
|
||||||
|
|
||||||
|
|
||||||
# ``apache.vhosts`` formula additional configuration:
|
# ``apache.vhosts`` formula additional configuration:
|
||||||
sites:
|
sites:
|
||||||
example.net:
|
example.net:
|
||||||
|
Loading…
Reference in New Issue
Block a user