[RC] Log remote ip

This commit is contained in:
thopic 2021-10-18 23:29:05 +02:00
parent 0fc7c68753
commit 701addfdbe
Signed by: thopic
GPG Key ID: 292DBBF0B54AD4C5

View File

@ -1,5 +1,13 @@
FROM roundcube/roundcubemail:1.4.11-apache 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; \ RUN set -ex; \
apt-get update; \ apt-get update; \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \