apache2: Ermögliche Logging der RemoteIP

This commit is contained in:
phil 2023-01-16 15:52:08 +01:00
parent fd43dbbb59
commit 7d29bb73c4
2 changed files with 10 additions and 3 deletions

View file

@ -30,11 +30,14 @@
- letsencrypt.conf - letsencrypt.conf
- sao-cache.conf - sao-cache.conf
- name: "configuration | Kopiere SSL-Konfiguration" - name: "configuration | Kopiere Templates"
ansible.builtin.template: ansible.builtin.template:
src: ssl.conf src: "{{ item }}"
dest: /etc/apache2/conf-available/ssl.conf dest: /etc/apache2/conf-available/
mode: 0644 mode: 0644
loop:
- remoteip.conf
- ssl.conf
- name: "configuration | Aktiviere Module" - name: "configuration | Aktiviere Module"
ansible.builtin.apache2_module: ansible.builtin.apache2_module:

4
templates/remoteip.conf Normal file
View file

@ -0,0 +1,4 @@
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy {{ gateway_host_ip }}
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" remotip