Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache Reverse Proxy config #161

Open
stevezau opened this issue Sep 7, 2024 · 0 comments
Open

Apache Reverse Proxy config #161

stevezau opened this issue Sep 7, 2024 · 0 comments

Comments

@stevezau
Copy link

stevezau commented Sep 7, 2024

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant