> After testing this I see that:
>
> Apache uses the IP address of the remote host to determine whether to
> allow or deny access.
>
> Even though PHP is running on localhost, and making a request via the
> virtual() function, Apache still knows the IP address of the remote
> host, and uses that.
I didn't think of that
I just did a test on my own server and used
readfile("http://..../cgi-bin/test") where test just prints
getenv("REMOTE_ADDR") and it prints the ip address of eth0, so you'd be able
to do it this way - but I don't think using readfile() is as nice as
virtual() in this case because readfile() performs another literal http
request back to the server causing the use of another httpd process I think,
whereas virtual() probably doesn't
Another way you might be able to do it is find an environment variable that
is only present when the cgi's are executed by the virtual() call, then use
the apache SetEnvIf directive combined with <DirectoryMatch>
jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]