Apache als Reverse-Proxy für Sharkey
Hier mal eine vhosts file zur Hilfe. Angenommen Sharkey rennt mit Docker und Apache macht Reverse Proxy..
ServerName fedi.monkee.ch
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]
ProxyPass "/streaming" "ws://127.0.0.1:3000/streaming"
ProxyPassReverse "/streaming" "ws://127.0.0.1:3000/streaming"
ProxyPass "/" "http://localhost:3000/" connectiontimeout=5 timeout=30 keepalive=on
ProxyPassReverse "/" "http://localhost:3000/"
ProxyRequests On
ProxyPreserveHost On
Das Frontend funktioniert auch ohne WS websockets, aber nicht so smooth wie mit ;-)