Fix: force HTTPS=on in Apache for Traefik proxy
This commit is contained in:
+3
-11
@@ -5,17 +5,9 @@
|
|||||||
|
|
||||||
FROM espocrm/espocrm:latest
|
FROM espocrm/espocrm:latest
|
||||||
|
|
||||||
# Fix redirect loop behind Traefik reverse proxy
|
# Fix redirect loop: tell Apache it's behind HTTPS proxy (Traefik)
|
||||||
RUN a2enmod remoteip headers && \
|
RUN echo 'SetEnv HTTPS on' > /etc/apache2/conf-available/force-https.conf && \
|
||||||
echo '<IfModule mod_remoteip.c>\n\
|
a2enconf force-https
|
||||||
RemoteIPHeader X-Forwarded-For\n\
|
|
||||||
</IfModule>\n\
|
|
||||||
<IfModule mod_headers.c>\n\
|
|
||||||
RequestHeader set X-Forwarded-Proto "https" env=HTTPS\n\
|
|
||||||
</IfModule>\n\
|
|
||||||
SetEnvIf X-Forwarded-Proto "https" HTTPS=on' \
|
|
||||||
> /etc/apache2/conf-available/reverse-proxy.conf && \
|
|
||||||
a2enconf reverse-proxy
|
|
||||||
|
|
||||||
# Copy custom extensions and modifications
|
# Copy custom extensions and modifications
|
||||||
COPY custom/ /var/www/html/custom/
|
COPY custom/ /var/www/html/custom/
|
||||||
|
|||||||
Reference in New Issue
Block a user