Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voiprodrigo/f4a283e7adb6dd3fbd7479750c4d1e0b to your computer and use it in GitHub Desktop.
Save voiprodrigo/f4a283e7adb6dd3fbd7479750c4d1e0b to your computer and use it in GitHub Desktop.
Apache2 Proxy Server Recipe for QlikSense to accomodate https and Secure WebSocket (wss) connections

Scenario

-------------       ----------------       ---------
| Browser   |<----->| Apache httpd |<----->| Qlik  |
|           |  SSL  |     2.4.9    |  SSL  | Sense |
-------------       ----------------       ---------

Enable mod_proxy_wstunnel

  • QlikSense has several urls that are WebSocket (wss://) connections and will require the wstunnel proxy module.
a2enmod proxy_wstunnel

apache2 vhost configuration

  • QlikSense requires /app to be a WebSocket (wss://) connection.
  • QlikSense uses /hub as both a regular https connection and a WebSocket (wss://) connection, so the RewriteRule is required to allow both https and wss traffic through.
RewriteEngine On
RewriteCond             %{HTTP:Upgrade} =websocket
RewriteRule             /(.*)           wss://qliksense-server/$1 [P,L]
RewriteCond             %{HTTP:Upgrade} !=websocket
RewriteRule             /(.*)           https://qliksense-server/$1 [P,L]

ProxyPass               /               https://qliksense-server/
ProxyPassReverse        /               https://qliksense-server/

ProxyPreserveHost On
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment