Configuring apache for Web Socket SSL Switchboard: Difference between revisions
No edit summary |
m (Admin moved page Configuring apache for Web Socket SSL Realtime Portal to Configuring apache for Web Socket SSL Switchboard) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
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 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. | ||
While CentOS 7 supports proxying websocket directly, 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: | |||
<pre> | <pre> | ||
Line 21: | Line 21: | ||
[[file:rtportalconfig.png|400px]] | [[file:rtportalconfig.png|400px]] | ||
Don't forget to add to your /etc/rc.local and to start manually the first time | |||
<pre> | |||
nohup /usr/local/bin/restartrtportal.sh & | |||
</pre> | |||
== Updating libraries == | == Updating libraries == | ||
Line 33: | Line 40: | ||
</pre> | </pre> | ||
then run composer update | then run | ||
<pre>php composer.phar update</pre> |
Latest revision as of 17:08, 23 March 2020
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.
While CentOS 7 supports proxying websocket directly, 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"
Don't forget to add to your /etc/rc.local and to start manually the first time
nohup /usr/local/bin/restartrtportal.sh &
Updating libraries
It can be needed to upgrade some libraries used by the software, in this case you need to first install composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');"
then run
php composer.phar update