httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dario Spagnolo <sp...@no-log.org>
Subject [users@httpd] Apache randomly uses the wrong vhost
Date Wed, 09 Oct 2002 00:23:42 GMT
Hi all,

I have a problem with Apache 1.3.26 running on a GNU/Linux 2.4 server.
Apache is configured with a multiple vhost configuration and each vhost has 
php specific limitations to restrict access to other user home directories 
(php_admin_value safe_mode and open_basedir).
What happens is that, on a random basis, when accessing a php script, the page 
gets printed with lots of errors saying that the script does not have access 
to the requested file. Here is one of those warning blocks :

"
Warning: open_basedir restriction in effect. File is in wrong directory in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: open_basedir restriction in effect. File is in wrong directory in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: Failed opening '../zap/func/database.php' for inclusion 
(include_path='./:/home/revolterecherche:/var/www/html/revolterecherche') in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: open_basedir restriction in effect. File is in wrong directory in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: open_basedir restriction in effect. File is in wrong directory in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: Failed opening '../zap/func/sitetools.php' for inclusion 
(include_path='./:/home/revolterecherche:/var/www/html/revolterecherche') in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: open_basedir restriction in effect. File is in wrong directory in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: open_basedir restriction in effect. File is in wrong directory in 
/var/www/html/mrtg/vol_ppp0.php on line 44

Warning: Failed opening '/var/www/html/header.inc' for inclusion 
(include_path='./:/home/revolterecherche:/var/www/html/revolterecherche') in 
/var/www/html/mrtg/vol_ppp0.php on line 44 
"

This happenned while accessing the file 
http://mrtg.zaphebergeur.net/vol_ppp0.php. 
As you can see, Apache refuses the inclusion of (among others) header.inc 
because it is not in the include_path. Which is ok of course, except that the 
include_path is not the one that should apply to the vhost 
mrtg.zaphebergeur.net. It is the one that applies to 
revolterecherche.zaphebergeur.net.
After hitting the refresh, the page could load normally. This happens, let's 
say, once every 500 php scripts.

Here is my question. Is it possible that Apache uses an already spawned child 
to deal with a request that does not refer to the right vhost ?
Because from what I see (and it's very difficult to test it because it doesn't 
happen very often), Apache uses the wrong vhost configuration block to deal 
with requests.
If home directories were more "jailed" I couldn't even have access to that 
script, but I decided to make home directories world readable so even if 
Apache is using the wrong vhost configuration, it can still read the script. 
But then, the php limitations stop it from including files outside the 
(wrong) vhost.

Could this be a bug ?
Could this be related to PHP (4.2.3) ?
Is there another Apache mailing list for this kind of problems ?

I don't know if what I said was clear enough. It's something difficult to 
explain and my english doesn't help ! :(

Dario

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message