Install Nodejs & Websocket & PHP configuration please :v Centos 7

July 29, 2014 3.2k views

Help me Hi I want to use websocket as nginx is configured with hope you can help me is centos 7. I'ma little rookie appreciate your help

1 Answer

To enable websocket support on nginx, simply add the following lines below proxy_pass in your virtualhost config:

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Don't forget to restart nginx:

sudo service nginx restart
Have another answer? Share your knowledge.