Fix and update apache config (fixes #312)

This commit is contained in:
schlagmichdoch 2024-08-17 21:02:20 +02:00 committed by GitHub
parent 3e502a76d0
commit b34b3f7b39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -556,10 +556,6 @@ a2enmod proxy
a2enmod proxy_http a2enmod proxy_http
``` ```
```bash
a2enmod proxy_wstunnel
```
<br> <br>
Create a new configuration file under `/etc/apache2/sites-available` (on Debian) Create a new configuration file under `/etc/apache2/sites-available` (on Debian)
@ -570,18 +566,10 @@ Create a new configuration file under `/etc/apache2/sites-available` (on Debian)
```apacheconf ```apacheconf
<VirtualHost *:80> <VirtualHost *:80>
ProxyPass / http://127.0.0.1:3000/ ProxyPass / http://127.0.0.1:3000/ upgrade=websocket
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://127.0.0.1:3000/$1" [P,L]
</VirtualHost> </VirtualHost>
<VirtualHost *:443> <VirtualHost *:443>
ProxyPass / https://127.0.0.1:3000/ ProxyPass / https://127.0.0.1:3000/ upgrade=websocket
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "wws://127.0.0.1:3000/$1" [P,L]
</VirtualHost> </VirtualHost>
``` ```
@ -592,11 +580,7 @@ Create a new configuration file under `/etc/apache2/sites-available` (on Debian)
Redirect permanent / https://127.0.0.1:3000/ Redirect permanent / https://127.0.0.1:3000/
</VirtualHost> </VirtualHost>
<VirtualHost *:443> <VirtualHost *:443>
ProxyPass / https://127.0.0.1:3000/ ProxyPass / http://127.0.0.1:3000/ upgrade=websocket
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "wws://127.0.0.1:3000/$1" [P,L]
</VirtualHost> </VirtualHost>
``` ```