Configuring Nginx for WebSocket and Long Polling - Atmosphere/atmosphere GitHub Wiki

        map $http_upgrade $connection_upgrade {
            default Upgrade;
            ''      close;
        }

         location /chat {
            proxy_pass https://192.168.67.100:8443/chatapi;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_buffering off;
            proxy_ignore_client_abort off;
            break;
        }