[users@httpd] environment variable lost via location (mod_rewrite)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux