on affiche la vraie ip grace à mod_remoteip
This commit is contained in:
parent
aa13e4e815
commit
e4bef0053e
11
Dockerfile
11
Dockerfile
@ -1,8 +1,15 @@
|
|||||||
FROM "php:apache"
|
FROM "php:7.1-apache"
|
||||||
|
|
||||||
RUN rm -rf "/var/www/html" && \
|
RUN rm -rf "/var/www/html" && \
|
||||||
sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \
|
sed -i'' 's/^Listen 80$/Listen 8080/' "/etc/apache2/ports.conf" && \
|
||||||
sed -i'' 's/^<VirtualHost \*:80>$/<VirtualHost *:8080>/' '/etc/apache2/sites-enabled/000-default.conf'
|
sed -i'' 's/^<VirtualHost \*:80>$/<VirtualHost *:8080>/' '/etc/apache2/sites-enabled/000-default.conf' && \
|
||||||
|
{ \
|
||||||
|
echo 'RemoteIPHeader X-Real-IP'; \
|
||||||
|
echo 'RemoteIPProxiesHeader X-Forwarded-By'; \
|
||||||
|
} | tee "$APACHE_CONFDIR/conf-available/remoteip.conf" && \
|
||||||
|
a2enconf remoteip && \
|
||||||
|
a2enmod remoteip
|
||||||
|
|
||||||
|
|
||||||
COPY "root" "/var/www/html"
|
COPY "root" "/var/www/html"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user