From 04178c5af4e232bb1a54ef0211c90de1badb0230 Mon Sep 17 00:00:00 2001 From: Chaim Date: Sun, 15 Mar 2026 14:35:00 +0000 Subject: [PATCH] Fix: force HTTPS=on in Apache for Traefik proxy --- Dockerfile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index f095207a28..1d25785945 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,17 +5,9 @@ FROM espocrm/espocrm:latest -# Fix redirect loop behind Traefik reverse proxy -RUN a2enmod remoteip headers && \ - echo '\n\ - RemoteIPHeader X-Forwarded-For\n\ -\n\ -\n\ - RequestHeader set X-Forwarded-Proto "https" env=HTTPS\n\ -\n\ -SetEnvIf X-Forwarded-Proto "https" HTTPS=on' \ - > /etc/apache2/conf-available/reverse-proxy.conf && \ - a2enconf reverse-proxy +# Fix redirect loop: tell Apache it's behind HTTPS proxy (Traefik) +RUN echo 'SetEnv HTTPS on' > /etc/apache2/conf-available/force-https.conf && \ + a2enconf force-https # Copy custom extensions and modifications COPY custom/ /var/www/html/custom/