Skip to content

Using Apache 2.4 as Reverse Proxy


RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://photoprism:2342/$1" [P,L]
ProxyPass / http://photoprism:2342/
ProxyPassReverse / http://photoprism:2342/
ProxyRequests off

The official documentation explains in detail, how to configure Apache Web Server 2.4 to reverse proxy WebSockets.


When installing PhotoPrism on a public server outside your home network, please always run it behind a secure HTTPS reverse proxy. Your files and passwords will be transmitted in clear text otherwise, and can be intercepted by anyone in between including your provider, hackers, and governments.