httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Lance Wilkinson" <>
Subject Re: [users@httpd] SetEnvIf failure or success?
Date Thu, 22 Mar 2012 17:56:02 GMT
J.Lance Wilkinson wrote:
> 3)   SetEnvIf REQUEST_URI "^(.*)/umg-(.*)$" UMG=$1
> Logs (non-matching) REQUEST_URI of "/server-info?config" as:
>  ....."GET /server-info?config HTTP/1.1" 200 38314 UMG=-
> Logs (matching) REQUEST_URI of 
> "/umgs/umg-up.dlt.ul.gml.managers/umgs.php" as:
>  ....."GET /umgs/umg-up.dlt.ul.gml.managers/umgs.php HTTP/1.1" 401 1837
>                          UMG=/errorpages/401.html
> I have to wonder if it's not the parsing, but the assignment that's 
> failing, that version 2.0.15 thing -- that my Solaris 10 version of the 
> code is old...

	Nope, assignment is happening correctly.

	Problem was that I still had my <Location/> stanza active which
	actually tries to USE the extracted variable in a require ldap-group
	directive.   And clearly that part doesn't work (yet).

	The following directives, when there's no <Location/> stanza matching
	the same REQUEST_URI, does indeed extract the desired content:

LogFormat "%h %l %u %t \"%r\" %>s %b UMG=%{UMG}e" umgs
CustomLog logs/umg.log umgs
SetEnvIf REQUEST_URI "^/(.*)/umg-(.*)(.html|/(.*)?)$" UMG=$2

Logs (non-matching) REQUEST_URI of "/liasprobe/helpalert" as:
  ....."GET /liasprobe/helpalert HTTP/1.1" 200 425 UMG=-

Logs (matching) REQUEST_URI of "/umgs/umg-up.dlt.ul.gml.managers/umgs.php" as:
  ....."G"GET /umgs/umg-up.dlt.ul.gml.managers/umgs.php HTTP/1.1" 200 56920

The previously noted UMG=/errorpages/401.html was apparently due to 
authentication failure (401) on the previously included <Location/> stanza that 
tried to use the value of UMG in a 'require ldap-group' directive
		("require ldap-group cn=umg/${UMG},dc=someorg,dc=somedomain")
being rewritten (?) thru an ErrorDocument directive to a different URI, which 
apparently re-parsed in SetEnvIf ???

J.Lance Wilkinson ("Lance")		InterNet:
Systems Design Specialist - Lead	Phone: (814) 865-4870
Digital Library Technologies		FAX:   (814) 863-3560
E3 Paterno Library
Penn State University
University Park, PA 16802

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message