httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jayson Strudwick" <>
Subject SetEnvIf Woes
Date Thu, 29 Nov 2001 18:53:54 GMT
I have checked the documentation numerous times,
I have looked at examples provided online, and for
some reason I still can not get the SetEnvIf directive
to work as I expected it to.

I have a directory password protected via an .htaccess
file using the mod_auth directives, that all works fine.

What I am playing around with is logging authenticated
requests to the server to one logfile, and all the rest
to a second logfile. I am attempting to use the following
within the VirtualHost definition.
        SetEnvIfNoCase REMOTE_USER "<username>" login
        CustomLog logfile_auth combined env=login
        CustomLog logfile combined env=!login

*note <username> is a valid user, I am just working with 1 login for
  now, I will worry about writing the regexp to deal with any login later*

I have confirmed that the username I provide is the one being seen by the
server, both from the logfiles themselves, and by echoing the value to
the protected page via PHP.

I have tried to provide the username both with and without quotes, I have
seen examples with both. I have tried ^username$, I have tried using both
the case sensitive and non sensitive versions of the directive. I have tried
a different varname incase login had special meaning within the code.

I can successfully log to different files dependant upon remote host, so I
am guessing that the problem may lie in the fact that the username is not
being sent as expected by Apache?

Any help would be greatly appreciated,
Jayson Strudwick

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message