Hello folks;
I been banging my head about this one for quite some time and I can't
seem to figure it out. I have a clean base install of Debian 5 on
three machines. One is a virtual machine on my desktop computer, one
is an old PowerPC-G3 macintosh, and the last is a leased server at a
colocation. All of the servers experience the same issue.
In all cases, doing a fresh install of Debian, libapache2-mod-suphp,
and apache2 (along with the PHP5 cgi and all supporting packages as
determined by apt-get) results in a working configuration with PHP. I
set a new virtualhost directive for Apache2 to be in the
/home/username/public_html/domain.com directory:
***********************************************************
***********************************************************
<VirtualHost example.hostname.com:80>
ServerAdmin webmas...@localhost
DocumentRoot /home/username/public_html/example.hostname.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
***********************************************************
***********************************************************
Here is where it gets weird. I have my suphp config file now
configured with the docroot:
docroot=/home/${USERNAME}/public_html
and when I try to execute a PHP script from the web browser, it complains:
[Mon Nov 02 16:54:59 2009] [error] [client xx.xx.xx.xx] SoftException
in Application.cpp:202: Script
"/home/username/public_html/example.hostname.com/index.php" resolving
to "/home/username/public_html/example.hostname.com/index.php" not
within configured docroot
I also found that using multiple values for a variable as explained in
the documents for suphp don't work. The colon (:) and the extra line
(+=) don't appear to work. Other variables like ${HOME} do not work
either, and throw the same error. If I change the docroot to "/home"
it works fine, but I don't want to keep it that way for security
reasons. Below is my suphp.conf file in it's entirety:
***********************************************************
***********************************************************
[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=www-data
;Path all scripts have to be in
docroot=/home/${USERNAME}/public_html
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
application/x-httpd-php=php:/usr/bin/php-cgi
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
***********************************************************
***********************************************************
Any help or insight into this would be appreciated.
Regards;
--Andrew Peng
_______________________________________________
suPHP mailing list
[email protected]
https://lists.marsching.com/mailman/listinfo/suphp