httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Khine <nor...@khine.net>
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
Hello,

(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} 
!=NOT-FOUND
      RewriteRule   ^/.*  -  [F]
      RewriteRule ^/(.*) http://localhost:12080/domain/$1 [P]
      RequestHeader set X-Base-Path domain/
   </IfModule>
    RewriteLogLevel 9
    RewriteLog /tmp/uk_domain_rewrite.log
    ErrorLog       /tmp/uk_domain_error.log
</VirtualHost>



The directories I want to protect are:

/users/X/;edit_account

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

/;login_form
/;register

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: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