Ubuntu 16.04
Sponsored Link

mod_proxy_wstunnel Settings2016/06/15

Enable mod_proxy_wstunnel module to set WebSocket Proxy.
[1] For example, configure Apache2 to set proxy on /chat for an application which listens on localhost:1337. The sample application is from here (section [3]).
a2enmod proxy proxy_http proxy_wstunnel

vi /etc/apache2/mods-enabled/proxy.conf
# add between <IfModule mod_proxy **> - </IfModule>

<IfModule mod_proxy.c>
    ProxyRequests Off
    <Proxy *>
        Require all granted

    ProxyPass /socket.io/
    ProxyPassReverse /socket.io/

    ProxyPass /chat
    ProxyPassReverse /chat

systemctl restart apache2
  Access to the sample App to make sure it works normally on proxy environment.
Matched Content