View the Wikipedia entry on Reverse Proxies for more information on reverse proxies uses and types of proxies servers.
mod_proxyin combination with Tomcat's HTTP connector; or
mod_jkApache module with the Tomcat AJP connector.
mod_proxyfor Apache versions 1.3X and 2.X.
We do not recommend changing the TDS context path (the
/thredds part of the URL path). However, if your network configuration requires that you use a different context path (e.g.,
/my/thredds) or you are proxying two TDS installations and need to differentiate them with different context paths (e.g.,
/thredds2), you will need to make the following changes:
thredds.warfile to match the desired context path before you deploy it to Tomcat.
Tomcat and other servlet engines direct incoming requests to a particular web application when the beginning of the request URL path matches the context path of that particular webapp. The
easiest way to let Tomcat (or any other servlet engine) know what context path to use for a given webapp is to rename that webapp's
.war file before deploying it to Tomcat.
For instance, if you want all URLs starting with
/thredds2 to be handled by your TDS install, rename the
thredds.war file to
thredds2.war before you deploy it to Tomcat.
If the desired context path is a multi-level context path (e.g.,
/my/thredds), you must use a pound sign ("#") in the
.war filename to encode the slash ("/"). In this case, the
thredds.war file would need to be renamed to
The deployment descriptor (
web.xml file) is overwritten during deployment which means this edit must be done every time the TDS is re-deployed.
web.xmlfile and change the value of the "ContextPath" parameter to match the desired context path.
The TDS uses the value of the "ContextPath" context parameter (as defined in the TDS
web.xml file) when generating TDS URLs in certain situations. To make sure all generated URLs are consistent, you must change the value of the "ContextPath" parameter to match the desired context path.
(Changing the value of "ContextPath" will no longer be necessary in a future release once we require Tomcat 6.0 (Servlet 2.5).
web.xml file is located in
<contextPath> is the value of the desired context path. The "ContextPath" context parameter is defined in the
web.xml file (starting at line 12):
<context-param> <param-name>ContextPath</param-name> <param-value>thredds</param-value> </context-param>
/thredds2 example, it should be changed to:
<context-param> <param-name>ContextPath</param-name> <param-value>thredds2</param-value> </context-param>
And for the
/my/thredds example, it should be changed to:
<context-param> <param-name>ContextPath</param-name> <param-value>my/thredds</param-value> </context-param>
So that users will receive the correct data access URLs for datasets served by your TDS, the base URLs given by the service elements in your TDS configuration catalogs must match the desired context path.
An OPeNDAP service element on a TDS with the context path of
/thredds2 would need to look similar to this:
<service name="odap" serviceType="OPeNDAP" base="/thredds2/dodsC/"/>
And similarly, an OPeNDAP service element on a TDS with the context path of
/my/thredds would need to look similar to this:
<service name="odap" serviceType="OPeNDAP" base="/my/thredds/dodsC/"/>
http://localhost:8080/thredds/admin/debug) and follow the "Show HTTP Request info" link. Once there, check that the values listed for server name and port and the context path all match the appropriate values from the request URL. E.g., for the URL
http://localhost:8080/thredds/admin/debug?General/showRequest, the values should be