schlagmichdoch / PairDrop

PairDrop: Transfer Files Cross-Platform. No Setup, No Signup.
https://pairdrop.net
GNU General Public License v3.0
4.41k stars 246 forks source link

[Docs] Example configuration for Apache is not working #312

Closed schlagmichdoch closed 1 month ago

schlagmichdoch commented 2 months ago

My apache config looks like this:

<VirtualHost *:80>
   ServerName mydomain

Redirect permanent / https://mydomain/

</VirtualHost>

<VirtualHost *:443>
   ServerName mydomain

ProxyPass / http://127.0.0.1:3082/

RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://127.0.0.1:3082/$1" [P,L]

SSLCertificateFile /etc/letsencrypt/live/xxx.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

It doesn't work if I put "https" in the ProxyPass section as mentionned in the documentation (lots of ssl errors in apache's logs) and also if I put "wws://" in the websocket section of the apache config, it doesn't work.

_Originally posted by @infocillasas in https://github.com/schlagmichdoch/PairDrop/issues/310

Apparently, the example config for using Apache HTTP server as the reverse proxy is not working. Including the config by @infocillasas in the docs should fix this.