tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert D. Abernethy IV" <>
Subject RE: Tomcat + Apache + SSL
Date Tue, 23 Sep 2003 18:18:50 GMT
I tried that with mixed results.  I was able to use mod_rewrite to
redirect non-Tomcat contexts, but was unable to redirect what I wanted.
Does apache process the mod_jk stuff first?  It looks like it is seeing
securecontext and passing it to Tomcat before it gets to the rewrite
rules.  Here's my results using mod_rewrite (foo is a directory in the
web server root, while secure context is a Tomcat webapp).

http://servername/* -> http://servername/*
http://servername/foo -> https://servername/foo
http://servername/securecontext -> http://servername/securecontext

Rob Abernethy

-----Original Message-----
From: Sean Bruton [] 
Sent: Tuesday, September 23, 2003 2:07 PM
To: Tomcat Users List
Subject: Re: Tomcat + Apache + SSL

You can use mod_rewrite in Apache. It's been a while but I believe
something such as this in your httpd.conf should do the trick:

RewriteEngine On
RewriteRule ^/securecontext(.*) https://servername/securecontext$1 [R]

I may be off a bit, so check the docs at:

or this helpful guide:

On Tue, 2003-09-23 at 12:04, Robert D. Abernethy IV wrote:
> I have apache set up to redirect requests for a specific context to
> Tomcat.  I am curious if there is a way to force all requests to that
> context to be redirected through SSL.
> http://servername/securecontext --> https://servername/sercurecontext
> http://servername/everythingelse --> http://servername/everythingelse
> Is this something I set up in or httpd.conf?  Can
> anyone point me at a decent tutorial?  Thanks.
> Rob Abernethy
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Sean Bruton           <>
Senior Engineer       Network Services
NeoSpire, Inc.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message