Overview
There are a number of reasons why you would want to make pulse™ accessible via an apache webserver.
- If pulse is running in a secure network, you can use apache to allow external clients to access the pulse™ web user interface.
- Apache will allow some measure of control over the URL uses to access pulse. Two common examples of such urls are http:// pulse.yourhost.com or http:// www.yourhost.com/pulse
 |
This is not a tutorial on how to configure Apache VirtualHosts. For that, see the official documentation |
Using Apache VirtualHosts to access pulse
The approach we are taking with this cookbook recipe is to first define and configure the external url and then to configure pulse™ to correctly handle forwarded requests.
Step 1: Select an external URL
The first thing you need to do is to determine what URL you want to use to reach pulse™ (We call this the external URL for the remainder of this tutorial). We are going to use two example urls.
- http: //pulse.host.com
- http: //www.host.com/pulse
Step 2: Configure the Apache VirtualHosts
The following examples assume that you have pulse™ installed on host 192.168.1.98 on port 8080. You will need to change this to match your deployment environment.
To make pulse™ available to http: //pulse.host.com, you would add the following to the end of your Apache httpd.conf file.
This configuration tells Apache to forward all requests it receives on port 80 to http: //192.168.1.98:8080/
Alternatively, to make pulse™ available to http: //www.host.com/pulse, you would add the following to the Apache http.conf file
For complete details on how to configure Apache, please refer to the Apache documentation.
Step 3: Configure pulse™ to handle the forwarded requests.
To configure pulse™ to handle the requests forwarded from apache, we need to ensure that the pulse™ context path is configured to the exact same path that is used by Apache. This is very important.
Using our two examples from above:
- If your external URL is http: //pulse.host.com, then the context path for pulse™ should be its default, ie: '/'. Unless you have previously changed the context path, no changes are required.
- If your external URL is http: //www.host.com/pulse, then the context path for pulse™ should be set to '/pulse', as described below.
The recommended method for specifying the context path is to update the pulse server configuration file. This file defines the webapp.contextPath which can be changed to specify a context path of your choice. So, taking our second example from above, you would set the context path as follows:
You can also override this setting on the command line by using the following.
If you find that you need to change the context path for a running pulse™ instance, remember that you will need to restart pulse™ for the change to take affect.
 |
It is very important that you ensure that pulse™ is configured to use the EXACT SAME context path being used by Apache. |
Step 4: Configure your pulse™ base URL property.
Finally, the last thing you need to do is to set the base URL property to be the external URL. Without this, your pulse™ web UI will be missing all of its images, styles and javascript. Functional, but not very pretty.
You can set the base URL property via the General Configuration shown when selecting the root tree element on the administration > settings view.
Something is not right?
The symptoms of common misconfiguration problems include the following:
- no style sheets / images / javascript
- apache error page
If you are seeing any of these problems, you can use the following check list to help you track down what is wrong.
- check the configured pulse™ base URL matches the external URL.
- check that the path of the external URL matches the context path configured in pulse™
- check that the apache config forwards the request to the correct URL.
References
Apache 1.3 mod_proxy
Apache 2.0 mod_proxy