Re: suexec + chroot + fascgi php = no input file specified.

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

 



--- Jos Ewert <flami@xxxxxxxxx> wrote:

> Hi,
> 
> I want to set up a system like this :
> 
> /var/www/user/htdocs/abc.com
> /var/www/user/htdocs/def.com
> ...
try with

/var/www/htdocs/user/  <- trailing slash if putting
virtual hosts under this folder, since each vh need to
be given a unique document root.



> 
> 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/abc.com and PHP would
> have to look in
> /htdocs/abc.com.If 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 abc.com with doc_root
> /htdocs/abc.com and the same
> for def.com )
> I also tried Setenv PHP_DOCUMENT_ROOT
> /htdocs/abc.com , 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 (
> abc.com/index.php ->
> abc.com/abc.com/index.php )  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 ? )
> 
> Greetings,
> Josi
> 
> 
>
---------------------------------------------------------------------
> 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
> 
> 



      Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca


---------------------------------------------------------------------
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