Open jonathan-dejong opened 3 years ago
If I check out the request headers of the Webrtc a few seems set but it's not by my <Location>
directive. If I change a value in there nothing changes.
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8,sv;q=0.7
Cache-Control: no-cache
Connection: Upgrade
Host: snapdrop.mydomain.dev
Origin: https://snapdrop.mydomain.dev
Pragma: no-cache
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Sec-WebSocket-Key: 8y4DJ6ZhdImhLFF0mVoU/A==
Sec-WebSocket-Version: 13
Upgrade: websocket
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.86 Safari/537.36
I use nodejs version and the following config works for me
Define pport 3001 RewriteEngine On RewriteCond %{HTTP:CONNECTION} Upgrade [NC] RewriteCond %{HTTP:Upgrade} =websocket [NC] RewriteRule /(.) ws://localhost:${pport}/$1 [P,L] RewriteCond %{HTTP:Upgrade} !=websocket [NC] RewriteRule /(.) http://localhost:${pport}/$1 [P,L] ProxyPassReverse / http://localhost:${pport}/
This is my apache-config, which is working, except the "X-Forwarded-For-Part" You also have to enable proxy_http, proxy, proxy_wstunnel with a2enmod.
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /snapdrop/(.*) ws://localhost:8080/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /snapdrop/(.*) http://localhost:8080/$1 [P,L]
ProxyPass /snapdrop/ http://localhost:8080/
ProxyPassReverse /snapdrop/ http://localhost:8080/
ProxyPass /snapdrop/ ws://localhost:8080/
<Proxy https://localhost:8080/>
AllowOverride None
Order allow,deny
Allow from all
</Proxy>
Hi! I've got a digitalocean droplet where I thought I'd try and get snapdrop running selfhosted. It's running apache and are hosting ~5 sites already (really light traffic).
I've been trying to get snapdrop up and running on it using Ubuntu 18.04 + Apache but I am stuck on modifying the nginx config to apache which I think is the problem I have left.
What I've done
www/snapdrop.mydomain.dev
[Service] Type=simple User=www-data Group=www-data Restart=on-failure WorkingDirectory=/www/snapdrop.mydomain.dev/server ExecStart=/usr/bin/node index.js
[Install] WantedBy=multi-user.target