Configuring apache for Web Socket SSL Switchboard

From MiRTA PBX documentation
Revision as of 18:45, 12 December 2016 by Admin (talk | contribs) (Created page with "Unfortunately there is no available Server Websocket library supporting SSL out of the box. To allow Websocket connections over SSL, it is needed to configure a reverse proxy...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Unfortunately there is no available Server Websocket library supporting SSL out of the box. To allow Websocket connections over SSL, it is needed to configure a reverse proxy in Apache.

Unfortunately Apache shipped with CentOS 6 doesn't not support proxying Websocket protocol, so ad additional package needs to be installed. The package can be installed from the server repository:

yum -y install https://demo.mirtapbx.com/mirtapbx_support/mod_proxy_wstunnel-0.1-1.el6.fws.x86_64.rpm

Once this module is installed, you need to configure your reverse proxy by adding:

<IfModule mod_proxy.c>
    ProxyPass "/wsrtportal/" "ws://127.0.0.1:8081/"
    ProxyPassReverse "/wsrtportal/" "ws://127.0.0.1:8081/"
</IfModule>

If you prefer, you can just copy the wsproxy.conf file from MiRTA PBX protected folder in /etc/httpd/conf.d and restart your web server.

The port needs to match the port specified in the Admin/Settings "Real Time Portal service - Listening Port"

Rtportalconfig.png