Question

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

Posted July 29, 2014 6.5k 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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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
Submit an Answer