Cross-posting from the deegre-users ML:
Hi,
I'm not very much experienced with Apache 2.2 and Geoserver but this
should be so much a problem because owsProxy is independ of this. There
are two ways to install/use owsProxy
a) [owsProxy] -> http-call -> [geoserver] This means both owsProxy and
geoserver are running in different web context's registered in one
tomcat or in two different tomcats and owsProxy is installed as a
stand-alone web application
b) [owsProxy -> ServletFilter -> geoserver] This means both owsProxy and
geoserver running in the same web context and owsProxy is installed as a
Java Servlet Filter
The advantage of a) is that you are more flexible, e.g. by using a OWS
that is not written in Java. The advantage of b) is less overhead and so
it is faster, more robust and easyer to handle.
Example for a) (this is the one from documentation)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<filter>
<filter-name>OWSProxy</filter-name>
<filter-class>org.deegree_impl.security.owsproxy.ConfigurableOWSProxyServletFilter</filter-class>
<init-param>
<param-name>WMS:POLICY</param-name>
<param-value>./resources/wmspolicy.xml</param-value>
</init-param>
<init-param>
<param-name>CSW:POLICY</param-name>
<param-value>./resources/cswpolicy.xml</param-value>
</init-param>
<init-param>
<param-name>AuthenticationSettings</param-name>
<param-value>/WEB-INF/conf/security/authentication.xml</param-value>
</init-param>
<init-param>
<param-name>PROXYURL</param-name>
<param-value>http://myHost:8080/owsproxy/proxy</param\-value>
</init-param>
<init-param>
<param-name>ALTREQUESTPAGE</param-name>
<param-value>/altrequestpage.jsp</param-value>
</init-param>
<init-param>
<param-name>ALTRESPONSEPAGE</param-name>
<param-value>/altresponsepage.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>OWSProxy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>SimpleProxyServlet</servlet-name>
<servlet-class>org.deegree.enterprise.servlet.SimpleProxyServlet</servlet-class>
<init-param>
<param-name>WMS:HOST</param-name>
<param-value>http://localhost:8081/deegree/services</param\-value>
</init-param>
<init-param>
<param-name>CSW:HOST</param-name>
<param-value>http://localhost:8081/deegree/services</param\-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>SimpleProxyServlet</servlet-name>
<url-pattern>/proxy</url-pattern>
</servlet-mapping>
</web-app>
This says that you define owsProxy in a tomcat context where tomcat is
running on port 8080. The protected service (WMS and CSW) are running on
another server (no matter if tomcat or anything else) on port 8081. This
mean they are completly independ in its installation. It would be your
job to ensure that the WMS and CSW can just be accessed from the server
running owsProxy (in tomcat you would you <valve> elements for this).
oswProxy is running as a servlet filter in front of a simple proxy
servlet delegates incoming requests to the real OWS. Your client would
talk to http://:8080$myURL$/$myContext$/proxy and it would behave like a
WMS and a CSW
Example for b)
This is much same but now OWS are runing in the same web context.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<filter>
<filter-name>OWSProxy</filter-name>
<filter-class>org.deegree_impl.security.owsproxy.ConfigurableOWSProxyServletFilter</filter-class>
<init-param>
<param-name>WMS:POLICY</param-name>
<param-value>./resources/wmspolicy.xml</param-value>
</init-param>
<init-param>
<param-name>CSW:POLICY</param-name>
<param-value>./resources/cswpolicy.xml</param-value>
</init-param>
<init-param>
<param-name>AuthenticationSettings</param-name>
<param-value>/WEB-INF/conf/security/authentication.xml</param-value>
</init-param>
<init-param>
<param-name>PROXYURL</param-name>
<param-value>http://myHost:8080/owsproxy/proxy</param\-value>
</init-param>
<init-param>
<param-name>ALTREQUESTPAGE</param-name>
<param-value>/altrequestpage.jsp</param-value>
</init-param>
<init-param>
<param-name>ALTRESPONSEPAGE</param-name>
<param-value>/altresponsepage.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>OWSProxy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>owservice</servlet-name>
<servlet-class>org.deegree.enterprise.servlet.OGCServletController</servlet-class>
<init-param>
<param-name>services</param-name>
<param-value>wms</param-value>
<description>
list of supported services, e.g.: wfs,wms (comma separated),
will be replaced by ant
</description>
</init-param>
<init-param>
<param-name>wms.handler</param-name>
<param-value>org.deegree.enterprise.servlet.WMSHandler</param-value>
</init-param>
<init-param>
<param-name>wms.config</param-name>
<param-value>WEB-INF/conf/wms/wms_configuration.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>owservice</servlet-name>
<url-pattern>/services</url-pattern>
</servlet-mapping>
</web-app>
Here the owsProxy directly sits on top of a OWS realized as java servlet
(in this case a deegree WMS). So there is no additional/special Tomcat
for owsProxy. Your WMS can be reached as usual:
http//:$myURL$:8080/$myContext$/services
I hope this answers your questions
best regards
ANDREAS