forked from norman/fusionpbx-install.sh-github-mirror
Add websockets to nginx config
This commit is contained in:
@@ -124,7 +124,7 @@ server {
|
|||||||
#Snom
|
#Snom
|
||||||
rewrite "^.*/provision/.*-([A-Fa-f0-9]{12})\.?(cfg|htm)?$" /app/provision/index.php?mac=$1;
|
rewrite "^.*/provision/.*-([A-Fa-f0-9]{12})\.?(cfg|htm)?$" /app/provision/index.php?mac=$1;
|
||||||
rewrite "^.*/provision/C520-WiMi_([A-Fa-f0-9]{12})\.cfg$" /app/provision/index.php?mac=$1;
|
rewrite "^.*/provision/C520-WiMi_([A-Fa-f0-9]{12})\.cfg$" /app/provision/index.php?mac=$1;
|
||||||
rewrite "^.*/provision/([A-Fa-f0-9]{12})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
|
rewrite "^.*/provision/([A-Fa-f0-9]{12})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
error_log /var/log/nginx/error.log;
|
error_log /var/log/nginx/error.log;
|
||||||
@@ -180,6 +180,15 @@ server {
|
|||||||
ssl_ciphers HIGH:!ADH:!MD5:!aNULL;
|
ssl_ciphers HIGH:!ADH:!MD5:!aNULL;
|
||||||
#ssl_dhparam
|
#ssl_dhparam
|
||||||
|
|
||||||
|
#redirect websockets to port 8080
|
||||||
|
location /websockets/ {
|
||||||
|
proxy_pass http://127.0.0.1:8080;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
|
||||||
#redirect letsencrypt to dehydrated
|
#redirect letsencrypt to dehydrated
|
||||||
location ^~ /.well-known/acme-challenge {
|
location ^~ /.well-known/acme-challenge {
|
||||||
default_type "text/plain";
|
default_type "text/plain";
|
||||||
@@ -290,3 +299,4 @@ server {
|
|||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user