How to disable https redirection on Elastix systems for FOP2 only

FOP2 uses HTML5 websockets in order to deliver real time status updates to your browser.

The specification for such protocol is evolving and support in browsers has different kind of 'issues' that might bite you and will make establishing such connections problematic.

One of the issues is the enforcing on using secure websocket connections when the browser itselfs uses https to serve the web assets for FOP2.

In general you should not have issues, as FOP2 default configuration will use the same ssl self signed certificates that Elastix has configured. BUT! there is always a but, some browsers might not trust that self signed certificate (like several versions of Firefox/mozilla), and will require a special step to accept that certificate. Other times networking equipment comes in the middle and will mangle websocket packets, mostly if they are secure.

So, the 'correct' way would be to fix your networking equipment, or not use self signed certificates to avoid trust issues, etc.. something that is complex and many times not doable.

If your server is in a local network and you are not exposing it to the internet, there is no real reason to use encryption anyways. In any case, FOP2 own protocol does not send clear passwords on the wire. So a simple fix if you have problems or slow connections attempts to FOP2 is not enforce https when you access FOP2. 

So, edit the file:  /etc/httpd/conf.d/elastix.conf

Content will be similar to this: 

<Directory "/var/www/html">
    # Redirect administration interface to https
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</Directory>

Leave that as is, but add at the end of the file the following block:

<Directory "/var/www/html/fop2">
        RewriteEngine Off
</Directory>

Save the file and restart apache:

service httpd restart
 

Now, point your browser to http://your.server/fop2 and you won't be redirected to https so the websocket connection will be established almost instantly.


Did you find this article useful?