Pikzigmar
Pikzigmar
IImmich
Created by Pikzigmar on 5/8/2025 in #help-desk-support
httpd reverse proxy not making Websocket connection (I think)
I have been trying to set up Immich behind httpd reverse proxy as per the https://immich.app/docs/administration/reverse-proxy and https://www.reddit.com/r/immich/comments/1b0cgbq/apache_reverse_proxy_config_websockets_not_working/. My current config for httpd is:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName <DOMAIN>
ServerAdmin <EMAIL>

ErrorLog logs/immich-error.log
CustomLog logs/immich-access.log combined


RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://<IP>:2283/$1 [P,L]


RequestHeader set "X-Forwarded-Proto" "https"

ProxyPass /api/socket.io ws://<IP>:2283/api/socket.io
ProxyPassReverse /api/socket.io ws://<IP>:2283/api/socket.io

ProxyPreserveHost On
ProxyPass /.well-known !
ProxyPass / http://<IP>:2283/
ProxyPassReverse / http://<IP>:2283/

</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName <DOMAIN>
ServerAdmin <EMAIL>

ErrorLog logs/immich-error.log
CustomLog logs/immich-access.log combined


RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://<IP>:2283/$1 [P,L]


RequestHeader set "X-Forwarded-Proto" "https"

ProxyPass /api/socket.io ws://<IP>:2283/api/socket.io
ProxyPassReverse /api/socket.io ws://<IP>:2283/api/socket.io

ProxyPreserveHost On
ProxyPass /.well-known !
ProxyPass / http://<IP>:2283/
ProxyPassReverse / http://<IP>:2283/

</VirtualHost>
</IfModule>
I can connect to <DOMAIN> and enter login info but the login is not working. I I enter wrong password I get the apporpriate error: HTTPD LOG: [08/May/2025:17:14:39 +0200] "POST /api/auth/login HTTP/1.1" 401 108 DOCKER LOG: [Nest] 17 - 05/08/2025, 2:58:07 PM WARN [Api:AuthService~q10yo8ts] Failed login attempt for user <EMAIL> from ip address <PUBLIC_IP> Using correct password: HTTPD LOG: [08/May/2025:17:15:05 +0200] "POST /api/auth/login HTTP/1.1" 201 226 There is no docker log. Using local IP to login gives this docker log: [Nest] 17 - 05/08/2025, 2:59:29 PM LOG [Api:EventRepository] Websocket Connect: m6ntjUZF-s_PCA92AAAD I am now lost and do not know how to fix the websocket connection. Is apache2/httpd unsupported?
17 replies