You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Norman Khine <no...@khine.net> on 2008/06/27 09:06:39 UTC

[users@httpd] https for sub-directories when using apache as a front end web server. (re-post)

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