Configuring apache for Web Socket SSL Switchboard: Difference between revisions

From MiRTA PBX documentation
Jump to navigation Jump to search
(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...")
 
No edit summary
Line 11: Line 11:
<pre>
<pre>
<IfModule mod_proxy.c>
<IfModule mod_proxy.c>
     ProxyPass "/wsrtportal/" "ws://127.0.0.1:8081/"
     ProxyPass "/wsrtportal/" "ws://127.0.0.1:8081/" retry=0 timeout=5
     ProxyPassReverse "/wsrtportal/" "ws://127.0.0.1:8081/"
     ProxyPassReverse "/wsrtportal/" "ws://127.0.0.1:8081/"
</IfModule>
</IfModule>

Revision as of 10:00, 31 July 2017

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/" retry=0 timeout=5
    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