WebSockets on nginx

location /api/websocket {
proxy_pass ws://192.168.56.101:8123/api/websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}

location / {
proxy_pass http://192.168.56.101:8123/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}

Source: ServerAdmin jovan@ris.mk ServerName smkocani.duckdns.org DocumentRoot /var/www/html # Available loglevels: trace8, …, trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for

WebSockets on nginx was last modified: July 15th, 2024 by Jovan Stosic

Leave a Reply