on affiche la vraie ip grace à mod_remoteip
This commit is contained in:
parent
7c28d4aea9
commit
0a771579e8
11
Dockerfile
11
Dockerfile
@ -1,8 +1,15 @@
|
||||
FROM "php:apache"
|
||||
FROM "php:7.1-apache"
|
||||
|
||||
RUN rm -rf "/var/www/html" && \
|
||||
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"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user