|
@@ -59,6 +59,16 @@ server {
|
59
|
59
|
proxy_set_header Host $http_host;
|
60
|
60
|
}
|
61
|
61
|
|
|
62
|
+ # xmpp websockets
|
|
63
|
+ location = /xmpp-websocket {
|
|
64
|
+ proxy_pass http://127.0.0.1:5280/xmpp-websocket?prefix=$prefix&$args;
|
|
65
|
+ proxy_http_version 1.1;
|
|
66
|
+ proxy_set_header Upgrade $http_upgrade;
|
|
67
|
+ proxy_set_header Connection "upgrade";
|
|
68
|
+ proxy_set_header Host $http_host;
|
|
69
|
+ tcp_nodelay on;
|
|
70
|
+ }
|
|
71
|
+
|
62
|
72
|
location ~ ^/([^/?&:'"]+)$ {
|
63
|
73
|
try_files $uri @root_path;
|
64
|
74
|
}
|
|
@@ -90,4 +100,13 @@ server {
|
90
|
100
|
|
91
|
101
|
rewrite ^/(.*)$ /http-bind;
|
92
|
102
|
}
|
|
103
|
+
|
|
104
|
+ # websockets for subdomains
|
|
105
|
+ location ~ ^/([^/?&:'"]+)/xmpp-websocket {
|
|
106
|
+ set $subdomain "$1.";
|
|
107
|
+ set $subdir "$1/";
|
|
108
|
+ set $prefix "$1";
|
|
109
|
+
|
|
110
|
+ rewrite ^/(.*)$ /xmpp-websocket;
|
|
111
|
+ }
|
93
|
112
|
}
|