cat au lieu de vim

This commit is contained in:
Benoît S. 2017-12-19 12:16:05 +01:00
parent d00cc68aa3
commit 8bc7978187

View file

@ -372,15 +372,17 @@ Voici un exemple d'utilisation en Stretch pour un reverse-proxy avec le réseau
~~~
# a2enmod remoteip
# vim /etc/apache2/conf-available/zzz-evolinux-custom.conf
# cat /etc/apache2/conf-available/zzz-evolinux-custom.conf
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 172.31.0.0/1
# systemctl reload apache2
~~~
Attention au niveau des logs cela ne suffit pas. L'astuce est de modifier le `LogFormat`, en remplaçant `%h` par `%a`.
~~~
cat /etc/apache2/conf-available/zzz-evolinux-custom.con
LogFormat "%v:%p %a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%a %l %u %t \"%r\" %>s %O" common