hosts = [ "peertube.immae.eu" ];
root = null;
extraConfig = [ ''
+ RewriteEngine On
+
+ RewriteCond %{REQUEST_URI} ^/socket.io [NC]
+ RewriteCond %{QUERY_STRING} transport=websocket [NC]
+ RewriteRule /(.*) ws://localhost:${env.listenPort}/$1 [P,NE,QSA,L]
+
+ RewriteCond %{REQUEST_URI} ^/tracker/socket [NC]
+ RewriteRule /(.*) ws://localhost:${env.listenPort}/$1 [P,NE,QSA,L]
+
ProxyPass / http://localhost:${env.listenPort}/
ProxyPassReverse / http://localhost:${env.listenPort}/
ProxyPreserveHost On
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
-
- ProxyPass /tracker/socket ws://127.0.0.1:${env.listenPort}/tracker/socket
- ProxyPassReverse /tracker/socket ws://127.0.0.1:${env.listenPort}/tracker/socket
-
- ProxyPass /socket.io ws://127.0.0.1:${env.listenPort}/socket.io
- ProxyPassReverse /socket.io ws://127.0.0.1:${env.listenPort}/socket.io
'' ];
};
};