Re: Win32 Apache 2.2.6 Allow from env= issue

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

 



On Nov 24, 2007 12:31 AM, Keith Sawmiller <k_sawmill@xxxxxxxxx> 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
> <Directory "Z:/Web Root">
>     Options FollowSymLinks
>     AllowOverride None
>     Order allow,deny
>     allow from env=TEST_VAR
> </Directory>
>
> ******************** BUT ******
> changing "env=TEST_VAR" to "all" grants access, shown below:
>
> SetEnv TEST_VAR
> <Directory "Z:/Web Root">
>     Options FollowSymLinks
>     AllowOverride None
>     Order allow,deny
>     allow from all
> </Directory>
>
> 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 <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