httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Khine <>
Subject [users@httpd] https for sub-directories when using apache as a front end web server. (re-post)
Date Fri, 27 Jun 2008 07:06:39 GMT

(Sorry if this post comes out twice, I don't see the first post which 
was posted yesterday ;'( )

I have a site where I would like to have certain sub-directories only 
open in https, the problem is that as I am also using a Rewrite rule as 
my application is python based, I am not sure how to incorporate this. 
Here is the apache directive for http

<VirtualHost *:80>
    ServerName uk.domain.tld
    ServerAlias fr.domain.tld
   <IfModule mod_rewrite.c>
      RewriteEngine On
      #DenyHosts Rules
      RewriteMap    hosts-deny      txt:/home/norman/apache/hosts.deny
      RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR]
      RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR]
      RewriteCond   ${hosts-deny:%{HTTP:true-client-ip}|NOT-FOUND} 
      RewriteRule   ^/.*  -  [F]
      RewriteRule ^/(.*) http://localhost:12080/domain/$1 [P]
      RequestHeader set X-Base-Path domain/
    RewriteLogLevel 9
    RewriteLog /tmp/uk_domain_rewrite.log
    ErrorLog       /tmp/uk_domain_error.log

The directories I want to protect are:


# Here the 'X' is variable and is a digit that relates to the user id.


Any advice as always much appreciated.

Norman Khine

%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) 
for c in ",adym,*)&uzq^zqf" ] )

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message