From 74a5eb2d8182bbed7ae432eae3f6cabd92905382 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Fri, 24 Jan 2020 11:41:30 -0600 Subject: [PATCH] add websocket templates to nginx example config --- doc/debian/jitsi-meet/jitsi-meet.example | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/debian/jitsi-meet/jitsi-meet.example b/doc/debian/jitsi-meet/jitsi-meet.example index 290083407..be1a992c4 100644 --- a/doc/debian/jitsi-meet/jitsi-meet.example +++ b/doc/debian/jitsi-meet/jitsi-meet.example @@ -59,6 +59,16 @@ server { proxy_set_header Host $http_host; } + # xmpp websockets + location = /xmpp-websocket { + proxy_pass http://127.0.0.1:5280/xmpp-websocket?prefix=$prefix&$args; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + tcp_nodelay on; + } + location ~ ^/([^/?&:'"]+)$ { try_files $uri @root_path; } @@ -90,4 +100,13 @@ server { rewrite ^/(.*)$ /http-bind; } + + # websockets for subdomains + location ~ ^/([^/?&:'"]+)/xmpp-websocket { + set $subdomain "$1."; + set $subdir "$1/"; + set $prefix "$1"; + + rewrite ^/(.*)$ /xmpp-websocket; + } }