I started using suPHP recently, and I'm spending an amazing amount of time debugging the configurations and different compile options to get something that actually works. I've tried contacting the development team through their mailing list, but it's obviously made of ghosts...
I am trying to use the chroot
parameter, but it trigger a 500 Internal Error which I just can't solve.
I am using DBD MySQL for the DocumentRoot definition:
<VirtualHost *:80>
ServerName *
DBDriver mysql
DBDParams <params>
DBDocRoot "SELECT document_root FROM domains WHERE name=%s" HOSTNAME
suPHP_Engine on
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-php
</VirtualHost>
Once the VirtualHost has set the DocumentRoot, suPHP is supposed to apply an additional chroot. See the relevant section of my /etc/suphp.conf
below:
docroot=${HOME}
chroot=${HOME}
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
check_vhost_docroot=false
The chroot
parameters couldn't possibly be simpler, yet suPHP spits:
Caused by SystemException in API_Linux.cpp:465: chdir() failed: No such file or directory
... when I make a request to a PHP script. The suphp
log does not contain any information, this line comes from the Apache error log.
Does anyone on Earth actually now how to setup this horrible chroot feature? I've been through countless forums and mails from the listing, but no-one has yet given a proper answer (even though this feature has been patched an unbelievable number of times). Or maybe I should switch to suExec, hoping it'll offer more satisfying results...?