We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 129935b + 1ce63bd commit c7d0bc3Copy full SHA for c7d0bc3
Dockerfile
@@ -66,6 +66,12 @@ RUN apt-get update && \
66
67
RUN a2enmod rewrite
68
69
+# Enable mod_remoteip to log real client IPs from X-Forwarded-For header
70
+RUN a2enmod remoteip
71
+COPY apache/remoteip.conf /etc/apache2/conf-available/remoteip.conf
72
+RUN a2enconf remoteip
73
+RUN sed -i 's/%h/%a/g' /etc/apache2/apache2.conf
74
+
75
RUN install -d /var/log/mediawiki -o www-data
76
RUN pecl install redis && docker-php-ext-enable redis
77
RUN pecl install yaml && docker-php-ext-enable yaml
apache/remoteip.conf
@@ -0,0 +1,4 @@
1
+<IfModule remoteip_module>
2
+ RemoteIPHeader X-Forwarded-For
3
+ RemoteIPTrustedProxy 10.0.0.0/8
4
+</IfModule>
0 commit comments