Connecting to LiveView through an Apache Proxy Server

Connecting to LiveView through an Apache Proxy Server

book

Article ID: KB0075187

calendar_today

Updated On:

Products Versions
TIBCO Live Datamart 2.x

Description

The Live Datamart javascript implementation requires several apache proxy and reverse-proxy settings to function correctly when using apache as a proxy server.

Resolution

For TIBCO Streaming 10.x and later, please see KB article: https://support.tibco.com/s/article/How-to-run-LiveView-behind-an-Apache-Load-Balancer

LiveView javascript requires these modules to be enabled in apache's httpd.conf:
  • LoadModule proxy_module modules/mod_proxy.so
  • LoadModule proxy_http_module modules/mod_proxy_http.so
  • LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

The proxy_wstunnel_module requires apache version 2.4. Older versions of apache do not include this module.

Use this working configuration as an example to proxy the sample_lv-javascript project's "simple" sample, which applies to LDM 2.0.3 and earlier:
 
# Reverse Proxy Config
ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

# Project Specific Redirects

<Location /simple >
ProxyPass http://localhost:10080/simple
ProxyPassReverse http://localhost:10080/simple
</Location>

# Platform Specific Redirects

<Location /lv-web/api >
ProxyPass http://localhost:10080/lv-web/api
ProxyPassReverse http://localhost:10080/lv-web/api
</Location>

<Location /lv/client >
ProxyPass http://localhost:10080/lv/client
ProxyPassReverse http://localhost:10080/lv/client
</Location>

<Location /atmosphere >
ProxyPass ws://localhost:10080/atmosphere
ProxyPassReverse ws://localhost:10080/atmosphere
</Location>

IMPORTANT: For LDM 2.0.4 and later, the /atmosphere entry should be replaced with /lv/streaming.

Your project may depend upon additional LiveView platform resources in addition to those required by the "simple" sample. You will need to troubleshoot your project to add these additional Location entries as needed.

To troubleshoot your configuration after any failure examine the most recent entries in apache/logs/access.log and enable the console view in your web browser (and make sure javascript messages are not hidden). The typical error will be "404" indicating that the proxy configuration generated an invalid URL for the location request. Inspect the URL and determine whether to add a new Location entry to the proxy configuration, or correct a ProxyPass setting in an existing Location-entry.

 

Issue/Introduction

Connecting to LiveView through an Apache Proxy Server