View Single Post
  #7  
Old 21st August 2011, 20:50
wolfric wolfric is offline
Junior Member
 
Join Date: Aug 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
[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=/var/www:${HOME}/public_html
dochroot=/var/www

;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=0022

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


[handlers]
;Handler for php-scripts
application/x-httpd-suphp="php:/usr/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
x-httpd-suphp="php:/usr/bin/php-cgi"
Also tried

dochroot=/var/www/clients/${GID}/${UID}/web
and restarted apache and it didn't work either (same message)

when i removed it or changed it back to what it originally was it worked... my bad. i think i saw dochroot=/var/www in a tutorial somewhere. Thanks for the help. Is there any reason why this didn't work though? it should have as far as I can see...

Edit: for chrooting the user in their web directory, should i use
chroot=/var/www/clients/${GID}/${UID}/web
when i tried this, i get a 500 error like before. (this is different to dochroot which was just to get suphp to run - i assume the chroot option really does chroot the user in the directory)

chroot should have been
chroot=/var/www/clients/${GROUPNAME}/${USERNAME}/web however it still doesn't work my path is /var/www/clients/client1/web1/web
id web1
uid=5004(web1) gid=5005(client1) groups=5005(client1),5002(sshusers)


I found new logs in /var/log/ispconfig/



[Mon Aug 22 23:23:03 2011] [error] [client 192.168.1.37] SoftException in Application.cpp:537: Could not execute script "/var/www/clients/client1/web1/web/index.php"
[Mon Aug 22 23:23:03 2011] [error] [client 192.168.1.37] Caused by SystemException in API_Linux.cpp:465: chdir() failed: No such file or directory
[Mon Aug 22 23:23:03 2011] [error] [client 192.168.1.37] Premature end of script headers: index.php

Last edited by wolfric; 23rd August 2011 at 00:29.
Reply With Quote