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

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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

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