我在Debian Wheezy上用Apache2和PHP5.4运行suPHP。
我发现.phps文件不会显示,访问将导致一个403页面。 chmod / chown / chgrp相同的文件将被允许执行。
我的/etc/apache2/mods-enabled/suphp.conf看起来像这样:
<IfModule mod_suphp.c> <FilesMatch "\.ph(p3?|tml)$"> SetHandler application/x-httpd-suphp </FilesMatch> suPHP_AddHandler application/x-httpd-suphp # Added to try to allow phps files suPHP_PHPPath /usr/bin/ AddType application/x-httpd-php-source .phps <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> suPHP_AddHandler application/x-httpd-php-source <Directory /> suPHP_Engine on </Directory> .....
该文件具有权限-rwxr-xr-x和正确的所有者/组。
/var/log/suphp/suphp.log不显示任何条目。
错误消息似乎直接来自Apache本身:
Forbidden You don't have permission to access /~user/script.phps on this server. Apache Server at www.example.com Port 80