From 94ac88a514273c49720fadb6a2b4432e69515170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Cap=C3=B3?= Date: Tue, 5 Dec 2023 12:32:12 +0000 Subject: [PATCH] fix ip behind proxy --- apache/site.conf | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apache/site.conf b/apache/site.conf index 00cb2dc..48d406f 100644 --- a/apache/site.conf +++ b/apache/site.conf @@ -1,19 +1,20 @@ #ServerName www.example.com - + ServerAdmin contact@ DocumentRoot /var/www/html - - - Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - allow from all - - - #LogLevel info ssl:warn - RemoteIPHeader CF-Connecting-IP + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Order allow,deny + allow from all + + + SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on + + #RemoteIPHeader CF-Connecting-IP + RemoteIPHeader X-Forwarded-For LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined ErrorLog ${APACHE_LOG_DIR}/error.log