httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffery Cann <jc...@tourneysoft.com>
Subject [users@httpd] Confused on RedirectMatch http to https
Date Thu, 31 Jul 2003 23:03:20 GMT
Hello.

I have been trying to get a redirect match to work.  I'm running the
following components:

Apache/2.0.46 (Unix) 
mod_ssl/2.0.46 
OpenSSL/0.9.7a 
mod_jk/1.2.2

All requests for /webapp/s/* should be redirected from HTTP to HTTPS. 
The goal here is to make sure no one can access any page under
/webapp/s/ via HTTP - must use HTTPS.

I have tried a few regexps and I seem to be missing some key piece of 
information because ones that I think should match do not.  I don't think it 
matters (maybe), but the /webapp/s/ is serviced by tomcat via mod_jk -- I 
have it all working just dandy under HTTP or
HTTPS.

First, I tried this to confirm that redirect match works (it does)
    RedirectMatch (.*) https://localhost/webapp/s/index.jsp

So I have tried various match expressions:

  RedirectMatch ^/webapp/s/(.*) https://localhost/webapp/s/$1
  RedirectMatch /webapp/s/(.*) https://localhost/webapp/s/$1
  RedirectMatch .*/webapp/s/(.*) https://localhost/webapp/s/$1

Other questions:  
0) Is mod_jk somehow affecting this problem?  I am not sure.  I am
assuming that redirects should happen before the request gets
forwarded.  Maybe this is my problem?
1) How can I get debug log output for RedirectMatch?  I set LogLevel debug in 
my httpd.conf and this didn't seem to trigger any logging.
2) Is my problem better (more easily) solved using mod_rewrite?
3) Do it make sense to add a deny rule for /webapp/s/ in my port 80
virtual host?

I appreciate any suggestions.
Jeff

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message