install proxy_wstunnel_module in cpanel/whm
I had apache 2.4.6 already installed so
Note:
– I downloaded the sources for 2.4.6
– You need mod_so
wget http://archive.apache.org/dist/httpd/httpd-2.4.6.tar.gz
tar -xf httpd-2.4.6.tar.gz
cd httpd-2.4.6
cd modules/proxy
/usr/local/apache/bin/apxs -i -a -c mod_proxy_wstunnel mod_proxy_wstunnel.c
as a bonus:
to configure apache proxy using socket.io use:
ServerName mydomain.com
ServerAlias *.mydomain.com
ProxyPreserveHost On
ProxyRequests off
ProxyPass /socket.io/1/websocket ws://mydomain.com:3000/socket.io/1/websocket
ProxyPassReverse /socket.io/1/websocket ws://mydomain.com:3000/socket.io/1/websocket
ProxyPass / http://mydomain.com:3000/
ProxyPassReverse / http://mydomain.com:3000/