Customising

This commit is contained in:
Ivan Grynenko 2016-07-06 21:01:15 +10:00
parent 70f5fbc741
commit 5e591d133a
5 changed files with 34 additions and 0 deletions

View file

@ -42,3 +42,6 @@ apache_mods_disabled: []
# Set initial apache state. Recommended values: `started` or `stopped`
apache_state: started
# To enable event MPM, change to true
apache_enable_event_mpm: false

View file

@ -22,3 +22,22 @@
mode: 0644
notify: restart apache
when: apache_create_vhosts
- name: Change to Event MPM
template:
src: "00-mpm.conf.j2"
dest: "{{ apache_modules_path }}/00-mpm.conf"
owner: root
group: root
mode: 0644
notify: restart apache
when: apache_enable_event_mpm
- name: Activate RemoteIP module
template:
src: "90-remoteip.conf.j2"
dest: "{{ apache_modules_path }}/90-remoteip.conf"
owner: root
group: root
mode: 0644
notify: restart apache

1
templates/00-mpm.conf.j2 Normal file
View file

@ -0,0 +1 @@
LoadModule mpm_event_module modules/mod_mpm_event.so

View file

@ -0,0 +1,10 @@
<IfModule !mod_remoteip.c>
LoadModule remoteip_module modules/mod_remoteip.so
</IfModule>
<IfModule mod_remoteip.c>
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
RemoteIPHeader X-Real-IP
RemoteIPInternalProxy 127.0.0.1/8
</IfModule>

View file

@ -4,6 +4,7 @@ apache_daemon: httpd
apache_daemon_path: /usr/sbin/
apache_server_root: /etc/httpd
apache_conf_path: /etc/httpd/conf.d
apache_modules_path: /etc/httpd/conf.modules.d
apache_vhosts_version: "2.2"