A proxy server such as a load balancer may be used with Calem to enforce security policy or to distribute load among Calem application servers. Some configuration changes are necessary for Calem to work with a proxy server.

1. Calem URL by HTTPs

If your proxy server is to terminate SSL and Calem is accessed with plain HTTP, one needs to tell Calem to always use HTTPs by adding the following line to your Calem_Home/server/conf/calem.custom.php.

$_CALEM_dist['calem_https_only']=true;
 

2. Calem URL by Proxy

Calem uses internally configured URLs sometimes for reports and presentation. One needs to define both URLs to use with the proxy server by adding the following two lines to your calem.custom.php (replace the internal IP and external URL by your service configuratiton).

//Internall URL for report generation
$_CALEM_dist['calem_full_uri_np']= 'http://127.0.0.1/index.php';

//External URL for report/image rendering
$_CALEM_dist['calem_full_uri']= 'https://acme.calemeam.com/index.php'; 

 3. Health Check

The proxy server should use HTTP "HEAD" request to check the status of Calem. For instance, a proxy server does health check of Calem every 5 seconds by sending an HTTP "HEAD" request to http://192.168.31.235 (replace the IP with that of your own Calem app server).

If HTTP "HEAD" request is not available to do health check use the following URL: http://192.168.31.235/status (replace the IP with that of your own Calem app server).

Doing health check by HTTP "GET" at Calem login URL such as http://192.168.31.235 will cause Calem app server to kick off processes for login and is not recommended.

 4. Web Client Javascript Loading

This configuration uses the best practice for JavaScript loading and may be necessary based on proxy server configuration. 

  • Calem Ajax Web client is built with JavaScripts. This configuration loads the client JavaScripts at the end of the body tag (before the body tag ends).
  • Add the configuration to your "calem.custom.php" to enable it.
$_CALEM_dist['cm_js_bf_body']=true;