httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@muly.dk
Subject [users@httpd] environment variable lost via location (mod_rewrite)
Date Tue, 30 Aug 2005 07:40:01 GMT
hi,

[apache 2.0.54]

i'm trying to forward an ssl client cert environment variable via a 
requestheader to a backend reversed proxied machine.
it works fine, but i'm only interested in forwarding it if the client 
request comes in at a certain url.


therefore i thought i'd use the location match like this:

	<location login/>
		SSLVerifyClient require 		SSLVerifyDepth  5
	</location>


then the client woukld indeed only be promted for the certificate at 
the location "/login", however then the environemt variable is 
completety lost.
i have tried to move the Location directive around in ssl-conf to no avail.


so my question is: how can i get hold of the ssl environment varibles 
(that i need in my RewiteCond) but only in the case where a client hits 
a uri underneatch "/login"


# this doesn't work
#<location login/>
#	SSLVerifyClient require #	SSLVerifyDepth  5
#</location>

# this works but on *all* URLS
SSLVerifyClient require SSLVerifyDepth  5

RewriteEngine On
RewriteMap canonicalize int:escape
RewriteCond  %{SSL:SSL_CLIENT_CERT} ^.+ [NC]
RewriteRule ^/login - [E=FORWARD_CERT:${canonicalize:%1}]
RequestHeader set MY_HEADER %{FORWARD_CERT}e env=FORWARD_CERT
RewriteRule ^/login	 http://localhost:8080/backend [P,L]


./allan





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