replex
replex copied to clipboard
Apache Reverse Proxy config
Hi, I've been testing out replex.. The instructions doesn't give you an example config for apache..
here is mine below? I'm happy to open a PR if you want me to add it to the readme etc?
Note, i also added the websocket.
<VirtualHost *:443 *:32400>
ServerName some.url.com
ProxyPass / http://127.0.0.1:3001/
ProxyPassReverse / http://127.0.0.1:3001/
ProxyPass /video/:/transcode/universal/session http://192.168.100.200:32400/video/:/transcode/universal/session
ProxyPassReverse /video/:/transcode/universal/session http://localhost:32400/video/:/transcode/universal/session
ProxyPass /library/parts http://192.168.100.200:32400/library/parts
ProxyPassReverse /library/parts http://192.168.100.200:32400/library/parts
ProxyPass /photo/:/transcode http://192.168.100.200:32400/photo/:/transcode
ProxyPassReverse /photo/:/transcode http://192.168.100.200:32400/photo/:/transcode
# WebSocket-specific configuration
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/:/websockets(.*) ws://192.168.100.200:32400/:/websockets$1 [P,L]
# Proxy WebSocket traffic
ProxyPass /:/websockets ws://192.168.100.200:32400/:/websockets
ProxyPassReverse /:/websockets ws://192.168.100.200:32400/:/websockets
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/some.url.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/some.url.com/privkey.pem
SSLProtocol +TLSv1.2
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Protocol https
RequestHeader set X-Forwarded-Ssl on
Header edit Location ^http://(.*)$ https://$1
ProxyRequests Off
ProxyPreserveHost On
ProxyErrorOverride Off
SSLProxyEngine On
</VirtualHost>