sharry
sharry copied to clipboard
Apache Reverse Proxy
As I invested quite some time to figure this out, I wanted to share the Apache configuration I use for the reverse proxy. The offical docs provide the Nginx config, but I am kind of stuck with apache on that particular machine.
- Sharry is running in a docker container basically as provided by this repository.
- Obviously, I changed the actual domain to
example.com
. - Apache mods for reverse proxy need to be enabled.
- As stated in the official docs, Sharry is currently not capable of running in a subdirectory. Hence, a subdomain is the only way to go.
<VirtualHost *:443>
ServerName sharry.example.com
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9090/
ProxyPassReverse / http://127.0.0.1:9090/
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:9090/$1 [P,L]
Include /etc/letsencrypt/options-ssl-apache.conf
Timeout 28800
KeepAlive On
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
</VirtualHost>