node.js - Nginx conf for socket.io -


I am using socket.io on my nginx server. I followed the doctor from nginx to configure my server ():

  location = / {proxy_pass_header server; Proxy_ http_version 1.1; Upgrade Proxy_set_header $ http_upgrade; Proxy_set_header connection "upgrade"; Proxy_redirect closed; Proxy_set_header X-real-IP $ remote_adder; Proxy_set_header X-Forward- $ proxy_add_x_forwarded_for; Proxy_set_header host $ http_host; Proxy_set_header X-NginX-Proxy True; Proxy_set_header x-forward-proto $ scheme; Proxy_pass http: // frontend; Proxy_interactive_error on; Error_page 501 502 503 504 / 50x.html; } Upstream frontend {server 127.0.0.1:7300; }  

Although I still get the following error in my browser:

  WebSket Connection 'ws: // & lt; MY DOMAIN & gt; /socket.io/? EIO = 3 & amp; Transport = websocket & amp; Sid = oway-6XKt7_HvqfQAAAC 'Failure: Error during WebSocket Handshake: Unexpected response code: 400  

Everything works fine locally, so I have a problem my NGN.

What should I change to make it work?

Many thanks


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -