Configuring httpd to redirect to OWF's tomcat?

94 views
Skip to first unread message

Thom DeCarlo

unread,
Jul 2, 2014, 11:27:36 AM7/2/14
to ozoneplat...@googlegroups.com
I'm trying to configure mod_proxy in my Apache httpd server to forward traffic directed to "http://server.mydomain.com/owf" to be handled by the Tomcat server. (This is to eliminate the need for the ":8080" port specification in the URL.)

My httpd.conf has the proxy configuration that looks like this:

ProxyRequests Off
ProxyPreserveHost On


<Proxy *>
   
Order deny,allow
   
Deny from all
   
Allow from .mydomain.com
</Proxy>


ProxyPass /
owf ajp://server.mydomain.com:8009/owf
ProxyPassReverse /owf ajp://server.mydomain.com:8009/owf
<Location /owf>
   
Order allow,deny
   
Allow from all
</Location>

ProxyPass /
examples/jsp ajp://server.mydomain.com:8009/examples/jsp
ProxyPassReverse /examples/jsp ajp://server.mydomain.com:8009/examples/jsp
<Location /examples/jsp>
   
Order allow,deny
   
Allow from all
</Location>


Now, when I go to http://server.mydomain.com/eamples/jsp I am correctly routed to the Tomcat server and I see the correct page. However, when I try to go to the /owf page, I get an error that says, "This page has a redirect loop. The webpage at http://server.mydomain.com/owf/ has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer."

I assume this happens because of the SSL redirection to port 8443, but I cannot come up with any way to make a configuration that pleases both httpd and tomcat. Has anyone else tried this?

Thanks,
Thom

Ross Pokorny

unread,
Jul 2, 2014, 11:35:04 AM7/2/14
to ozoneplat...@googlegroups.com
Thom

Look into the clustering instructions in Appendix B of the OWF Configuration
Guide. While it doesn't sound like you are setting up a cluster, these
instructions include the configuration of an httpd load balancer in front of
the OWF, similarly to what you are trying to do. Note that the instructions
in the guide use mod_jk instead of mod_proxy, but you should be able to adapt
it to mod_proxy's configuration style without too much trouble.

Ross Pokorny
OWF Developer.

Thom DeCarlo

unread,
Jul 2, 2014, 12:20:56 PM7/2/14
to ozoneplat...@googlegroups.com
Ross,
Thanks for the quick response. I will give that a whirl.

-Thom
Message has been deleted

iandic...@gmail.com

unread,
Nov 2, 2016, 9:52:55 AM11/2/16
to ozoneplatform-users
Hello Thom,

Did you get that ProxyPass business to work?  I am attempting to do the same thing and not having much luck.  I tried mod_proxy_ajp and mod_proxy_http configurations but I am only able to get as far as "You have been logged out. Press OK to refresh the page and log back in." from OWF.  I look briefly at the load balancing docs but that seems to imply localhost (which is not the case here since we are using a different apache server host).

Any help is welcome,

Ian



Ross Pokorny

unread,
Nov 2, 2016, 10:33:44 AM11/2/16
to ozoneplat...@googlegroups.com
Ian

OWF sets a cookie to give the user interface a hint of whether the user is
properly logged in. This is meant to prevent the OWF page from loading from
cache after the user has logged out and then failing in confusing ways when
all of the AJAX calls fail.

It sounds like on your system, the cookie either isn't getting set or is
getting stripped out by your reverse proxy. There are a couple of things you
can check:

1. Is the OZONELOGIN cookie present on the HTTP response from the reverse
proxy?
2. Is the OZONELOGIN cookie present on the HTTP response from the OWF server
to the reverse proxy?
3. Is your OWF security configuration properly configured to manage the
cookie? In the sample configurations, this happens as a result of
ozoneCookieFilter bean being included in a <sec:custom-filter> element in
OWFsecurityContext.xml

Ross Pokorny
Reply all
Reply to author
Forward
0 new messages