danimaniarqsoft
8/18/2019 - 7:46 PM

Nginx with WebSocket

in the file : /etc/nginx/conf.d/default.conf

server {
        listen 80;
        listen [::]:80;

        server_name example.com;

        location / {
             include proxy_params;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
             proxy_set_header Connection "upgrade";
             proxy_pass http://localhost:8080;
        }
}