|
@@ -48,16 +48,16 @@ matrix_variables=(ONION_ONLY
|
48
|
48
|
DEFAULT_DOMAIN_NAME)
|
49
|
49
|
|
50
|
50
|
function matrix_nginx {
|
51
|
|
- matrix_proxy_str="
|
52
|
|
- location /matrix {
|
53
|
|
- proxy_pass https://localhost:${MATRIX_PORT};
|
54
|
|
- proxy_buffering on;
|
55
|
|
- }"
|
56
|
|
- turn_proxy_str="
|
57
|
|
- location /turn {
|
58
|
|
- proxy_pass https://localhost:${TURN_PORT};
|
59
|
|
- proxy_buffering on;
|
60
|
|
- }"
|
|
51
|
+ matrix_proxy_str=' \
|
|
52
|
+ location /matrix { \
|
|
53
|
+ proxy_pass https://localhost:8448; \
|
|
54
|
+ proxy_buffering on; \
|
|
55
|
+ }'
|
|
56
|
+ turn_proxy_str=' \
|
|
57
|
+ location /turn { \
|
|
58
|
+ proxy_pass https://localhost:3478; \
|
|
59
|
+ proxy_buffering on; \
|
|
60
|
+ }'
|
61
|
61
|
|
62
|
62
|
if [ ! -f /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME} ]; then
|
63
|
63
|
matrix_nginx_site=/etc/nginx/sites-available/$DEFAULT_DOMAIN_NAME
|
|
@@ -140,7 +140,7 @@ function matrix_nginx {
|
140
|
140
|
sed -i "s|:443 ssl;|:443 ssl;${matrix_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
141
|
141
|
sed -i "s| default_server;| default_server;${matrix_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
142
|
142
|
fi
|
143
|
|
- if ! grep 'localhost:${TURN_PORT}' /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
|
|
143
|
+ if ! grep "localhost:${TURN_PORT}" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}; then
|
144
|
144
|
sed -i "s|:443 ssl;|:443 ssl;${turn_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
145
|
145
|
sed -i "s| default_server;| default_server;${turn_proxy_str}|g" /etc/nginx/sites-available/${DEFAULT_DOMAIN_NAME}
|
146
|
146
|
fi
|