From 701addfdbe3ca23210fd54978354bef547df9787 Mon Sep 17 00:00:00 2001 From: thopic Date: Mon, 18 Oct 2021 23:29:05 +0200 Subject: [PATCH] [RC] Log remote ip --- roundcube/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roundcube/Dockerfile b/roundcube/Dockerfile index 79022fe..cf1e5a9 100644 --- a/roundcube/Dockerfile +++ b/roundcube/Dockerfile @@ -1,5 +1,13 @@ FROM roundcube/roundcubemail:1.4.11-apache +RUN a2enmod remoteip; \ + echo "RemoteIPHeader X-Forwarded-For" > /etc/apache2/conf-available/remoteip.conf; \ + a2enconf remoteip; \ + sed -i -r 's/^ServerTokens .*/ServerTokens Prod/g' /etc/apache2/conf-available/security.conf; \ + sed -i -r 's/^ServerSignature .*/ServerSignature Off/g' /etc/apache2/conf-available/security.conf; \ + sed -i -E 's/^LogFormat "%h(.*)/LogFormat "%a\1/g' /etc/apache2/apache2.conf; \ + echo "expose_php = Off" > /usr/local/etc/php/conf.d/php_version.ini; + RUN set -ex; \ apt-get update; \ apt-get install -y --no-install-recommends \