Use websocket with domain name
Hello,
I am using the cPanel for the project. But the IP address is shared IP. I want to run the websocket(wss) with created sub domain via cPanel (i.e: www.websoc.example.com).
I found the vhost and changed for my request as follows but, If I use this via WHM include files, will it affect others running sites on that same shared IP?
Sample vhost
# Common SSL Config
ServerName websoc.example.com
SSLEngine on
SSLCertificateFile "/home/virtfs/usernew/etc/apache2/conf.d/ssl.crt/server.crt"
SSLCertificateKeyFile "/home/virtfs/usernew/etc/apache2/conf.d/ssl.crt/server.key"
DocumentRoot "/home/usernew/www/api"
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
# Websocket proxy
# wss redirects to working ws protocol
ProxyPass /wss ws://139.26.xxx.xxx:9090 retry=0 keepalive=On
ProxyPassReverse /wss ws://139.26.xxx.xxx:9090 retry=0
-
Hi, You can change the virtual host entry for the specified IP address in which the website is associated as follows so that other IP address and sites are not affected. # Common SSL Config ServerName websoc.example.com 0
Please sign in to leave a comment.
Comments
2 comments