How to setup Apache reverse proxy support of Websockets
-
first of all change following variable to false www\software\html5\settings.js > W.xhrreverse = false; (if you don’t change it to false, it will always try xhr instead websockets, what we don’t want anymore)
-
install Apache with proxy_wstunnel support (older Apaches without proxy_wstunnel are unsupported!)
-
allow in Apache config (httpd.conf etc.) following modules. LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
-
let’s assume you want to access html5 main portal via subfolder “/html5/” As example http://your_ip_or_domain.net/html5/ And Tsplus is installed in intranet on server “intranetxyz” then add to the config (httpd.conf etc.) following
ProxyPass /html5 http://intranetxyz:80 ProxyPassReverse /html5 http://intranetxyz:80
ProxyPass “ws://intranetxyz:80/socket.io/websocket_https”
ProxyPass “ws://intranetxyz:80/socket.io/websocket”
ProxyPass “ws://intranetxyz:80/socket.io/flashsocket_https”
ProxyPass “ws://intranetxyz:80/socket.io/flashsocket”
-
Restart Apache to take changes effect.