Apache-2.2

suphp 錯誤目錄/不屬於管理員

  • October 17, 2013

我正在嘗試從以下位置執行測試 phpinfo 頁面:

/home/admin/testdomain.com

但它顯示這樣的錯誤:

Internal Server Error

Directory / is not owned by admin
suPHP 0.7.1

我的 /etc/suphp.conf 是這樣的:

[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
min_uid=500
min_gid=48

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false

;Send minor error messages to browser
errors_to_browser=true

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
; x-httpd-php52="php:/usr/local/lxlabs/ext/php/bin/php_cgi"
x-httpd-php52="php:/usr/local/lxlabs/ext/php/etc/lxphpcgi.sh"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"

修復很簡單:

chown root.root /

引用自:https://serverfault.com/questions/505056