安装 su_php 后出现 500 错误,权限问题,“脚本“/index.php”的 UID 小于 min_uid”

安装 su_php 后出现 500 错误,权限问题,“脚本“/index.php”的 UID 小于 min_uid”

我刚刚su_php在我的服务器(amazon ec2 实例)上安装了它,我的 1 个应用程序需要它。

500 Internal server error现在,当我访问我托管的所有网站时,我都会收到一个。

错误日志:

[error] [client ip] SoftException in Application.cpp:350: UID of script "/var/www/html/www.mywebsite.org.uk/index.php" is smaller than min_uid
[error] [client ip] Premature end of script headers: index.php

ls -lwebroot 节目:

drwxrwxr-x  2 root     root 4096 Aug  7 14:23 aws.anothersite.co.uk
drwxrwxr-x  7 ec2-user root 4096 Oct  5 18:36 content.mywebsite.org.uk
drwxrwxr-x  5 root     root 4096 Sep 14 20:19 anothersite.co.uk
drwxrwxr-x  2 root     root 4096 Oct  5 18:51 logs
drwxrwxr-x  7 ec2-user root 4096 Oct  5 18:37 new.mywebsite.org.uk
drwxr-xr-x  9 root     root 4096 Aug  7 14:10 phpmyadmin
drwxrwxr-x  4 root     root 4096 Sep 10 20:39 wttw.anothersite.co.uk
drwxrwxr-x 27 ec2-user root 4096 Oct  5 18:26 www.mywebsite.org.uk

我希望控制的三个域su_php(如果可能的话)是:

drwxrwxr-x 27 ec2-user root 4096 Oct  5 18:26 www.mywebsite.org.uk
drwxrwxr-x  7 ec2-user root 4096 Oct  5 18:36 content.mywebsite.org.uk
drwxrwxr-x  7 ec2-user root 4096 Oct  5 18:37 new.mywebsite.org.uk

所有这些站点均已瘫痪,并抛出了500 Internal Server Error

anothersite.co.uk我希望所有域名和子域名都处于正常mod_php控制之下。

ls -l在目录内 www.mywebsite.org.uk

I removed most files, they all have the same perms as the below

-rw-rw-r--  1 ec2-user root     0 Oct  5 18:26 googleee78b20b75ffd653.html
drwxrwxr-x 23 ec2-user root 20480 Oct  5 18:26 images
drwxrwxr-x  2 ec2-user root  4096 Oct  5 18:26 includes
-r-x--x--x  1 ec2-user root  1956 Oct  5 18:59 index.php

我的虚拟主机文件如下:(如上所述,我只想要mywebsite.org.uk(&子域名) su_php

<VirtualHost *:80>
    DocumentRoot "/var/www/html/www.mywebsite.org.uk/"
    ServerName www.mywebsite.org.uk
    ServerAlias mywebsite.org.uk
    ErrorLog "/var/www/html/logs/mywebsite.org.uk-error_log"
    CustomLog "/var/www/html/logs/mywebsite.org.uk-access_log" common
    suPHP_Engine on
    suPHP_UserGroup ec2-user ec2-user
    AddHandler x-httpd-php .php .php3 .php4 .php5
    suPHP_AddHandler x-httpd-php
</VirtualHost>

任何帮助将非常感激!

答案1

我手边没有系统可以检查这一点,但我似乎记得从下docroot往上整棵树必须由 UID > min_uid 拥有,所以如果你配置了

docroot=/var/www

www/...然后需要正确配置来自(包括 /var/ )的目录。

相关内容