mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-03 00:30:18 +01:00
Customising
This commit is contained in:
parent
70f5fbc741
commit
5e591d133a
5 changed files with 34 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
1
templates/00-mpm.conf.j2
Normal file
|
@ -0,0 +1 @@
|
|||
LoadModule mpm_event_module modules/mod_mpm_event.so
|
10
templates/90-remoteip.conf.j2
Normal file
10
templates/90-remoteip.conf.j2
Normal 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>
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue