httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Sawmiller <k_sawm...@yahoo.com>
Subject Re: [users@httpd] Win32 Apache 2.2.6 Allow from env= issue
Date Sat, 24 Nov 2007 21:49:20 GMT
Joshua,
   
  That was the problem.  I have not tried setting the environment variables via PHP yet, but
it does behave properly now in my test case.
   
  Thanks for the help.

Joshua Slive <joshua@slive.ca> wrote:
  On Nov 24, 2007 12:31 AM, Keith Sawmiller wrote:
> I'm trying to restrict access to only instances where an environment
> variable is present (eventually to be set via PHP)
>
> This simple case (from httpd.conf) denies access:
>
> SetEnv TEST_VAR
> 
> Options FollowSymLinks
> AllowOverride None
> Order allow,deny
> allow from env=TEST_VAR
> 
>
> ******************** BUT ******
> changing "env=TEST_VAR" to "all" grants access, shown below:
>
> SetEnv TEST_VAR
> 
> Options FollowSymLinks
> AllowOverride None
> Order allow,deny
> allow from all
> 
>
> It seems like Apache is not passing the "env=TEST_VAR" test, even though
> everything I've found in the documentation and forums says this should work.

Try SetEnvIf instead. SetEnv acts during a different phase of
processing, which may be too late to make this work.

(You may have similar problems with trying to set an env variable in
php and use it in the apache config. I've never tried it myself.)

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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



       
---------------------------------
Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.
Mime
View raw message