httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jos Ewert <>
Subject [users@httpd] suexec + chroot + fascgi php = no input file specified.
Date Tue, 31 Jul 2007 12:07:10 GMT

I want to set up a system like this :


To serve php ( and maybe later other systems ) I chose fastcgi and
suexec that I modified to chroot, for flexibility and security.
I chroot to /var/www/user .
For each user I want a minimum of php processes to be spawned.
The problem is that PHP cant find the users document root, e.g. Apache
sends  /var/www/user/htdocs/ and PHP would have to look in
/htdocs/ I set doc_root in the php.ini I would have to set it
for each domain the user has and spam at least 1 process per domain. (
php.ini + process for with doc_root /htdocs/ and the same
for )
I also tried Setenv PHP_DOCUMENT_ROOT /htdocs/ , but i think this
doesn't work ( I can see the variable is send to php but its not used ).
I looked at the source of suexec, php and mod_fcgid and think there is
no way in these that could help in modifying the document root Apache
sends to PHP.
I think making a rewrite for each request ( -> )  would make  work if i set doc_root =
/htdocs .  But this look rather dirty and inefficient.
I think the best way to solve this is to send a different document root
php (and other cgi  processes ) then the one Apache uses.
How could this be achieved  ? ( maybe writing a module ? or is there
something similar already ? )


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

View raw message