trashposs/docs/examples/trashposs.apache.conf

42 lines
1.1 KiB
Plaintext
Raw Normal View History

# Replace example.com with your domain and set RemoteIPInternalProxy
<VirtualHost *:80>
2023-08-09 20:46:48 +02:00
ServerName example.com
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:3000/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://127.0.0.1:3000/$1 [P,L]
# Here we define the path to the WebSocket
ProxyPass "/streaming" "ws://127.0.0.1:3000/streaming"
ProxyPassReverse "/streaming" "ws://127.0.0.1:3000/streaming"
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
RemoteIPHeader X-Forwarded-For
RemoteIPHeader X-Real-IP
# Set this to the (internal) IP of your proxy server
RemoteIPInternalProxy 127.0.0.1
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
# Uncomment this if you are using SSL
#RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
AllowEncodedSlashes On
<Location / >
Require all granted
</Location>
2023-08-09 20:46:48 +02:00
</VirtualHost>