mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-24 09:49:05 +01:00
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
# Replace example.com with your domain and set RemoteIPInternalProxy
|
|
<VirtualHost *:80>
|
|
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>
|
|
</VirtualHost>
|