struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Jetty / Apache / mod_proxy config with sslext
Date Tue, 05 May 2009 03:08:24 GMT
On Monday 04 May 2009 11:49:02 am Andy Engle wrote:
> Hi all,
>
> I am using sslext in my Struts application to support http/https, and
> attempting to get all this to run on a Jetty server behind an Apache 2 web
> server.  The application runs fine, but I am really running into trouble
> with my configuration, particularly since sslext forwards to the specified
> http (or https) port.  This seems to almost always lead to a redirect loop
> error.  Here is how I have my configuration setup:
>
> In my app (I'll call it 'sa' here), I have the http port is set to 80, with
> https set to 443 (all this is setup in struts-config.xml).  In my
> httpd.conf, I have setup the following, which is the same in
> httpd-ssl.conf:
>
> ProxyPass             /sa  http://localhost:8080/sa
> ProxyPassReverse  /sa  http://localhost:8080/sa
>
> Jetty is running on port 8080.  With the configuration above, requests
> going to /sa are routed to Jetty, both for http and https requests.  This
> is where the trouble begins; sslext forwards to port 80, but then that
> forwards back to 8080 for Jetty, and so on and so on.  However, if I set my
> http/https ports to 8080/8443 in my struts app, then my links are shown as
> http://server:8443/link.do in my web pages, which then does not utilize
> port 443 as desired (similarly for 8080).
>
> Anybody have any good ideas on how to get around this issue?
>
>
> Thanks,
> Andy
>
>
> PS: I apologize if this is more a Tomcat/config question, but it seems this
> issue is caused mainly by sslext.
>

I have a similar setup for an app... But, I don't use sslext, I just use 
RewriteRules in apache to make sure that the pages I want to be secured are 
secured. This means I forward back to normal http for most pages and forward 
to https for pages that need it. It's fairly straightforward and I don't have 
to worry about it in the Java end of things.

-Wes


-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message