|
|
@ -12,3 +12,60 @@ Usage:
|
|
|
|
But of course the fun is to pipe into it...
|
|
|
|
But of course the fun is to pipe into it...
|
|
|
|
|
|
|
|
|
|
|
|
liquidsoap -v my.liq | python3 pipeserver --template pipeserver.html
|
|
|
|
liquidsoap -v my.liq | python3 pipeserver --template pipeserver.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Server proxies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### nginx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When behind an nginx proxy such as:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Appel du serveur local sur le port désormais alloué à apache
|
|
|
|
|
|
|
|
proxy_pass http://127.0.0.1:8080/;
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You will need to add to support websockets through the connection:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# websocket stuff
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### apache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Untested...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
a2enmod proxy
|
|
|
|
|
|
|
|
a2enmod proxy_http
|
|
|
|
|
|
|
|
a2enmod proxy_wstunnel
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
<VirtualHost *:80>
|
|
|
|
|
|
|
|
ServerName www.domain2.com
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RewriteEngine On
|
|
|
|
|
|
|
|
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
|
|
|
|
|
|
|
|
RewriteCond %{QUERY_STRING} transport=websocket [NC]
|
|
|
|
|
|
|
|
RewriteRule /(.*) ws://localhost:8080/$1 [P,L]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProxyPass / http://localhost:8080/
|
|
|
|
|
|
|
|
ProxyPassReverse / http://localhost:8080/
|
|
|
|
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<VirtualHost *:443>
|
|
|
|
|
|
|
|
ServerName ws.serverlab.ca
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RewriteEngine on
|
|
|
|
|
|
|
|
RewriteCond ${HTTP:Upgrade} websocket [NC]
|
|
|
|
|
|
|
|
RewriteCond ${HTTP:Connection} upgrade [NC]
|
|
|
|
|
|
|
|
RewriteRule .* "wss:/localhost:3000/$1" [P,L]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProxyPass / https://localhost:3000/
|
|
|
|
|
|
|
|
ProxyPassReverse / https://localhost:3000/
|
|
|
|
|
|
|
|
ProxyRequests off
|
|
|
|
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[source](https://stackoverflow.com/questions/27526281/websockets-and-apache-proxy-how-to-configure-mod-proxy-wstunnel)
|