当我尝试运行我的网站时,会显示500 internal server error
:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
错误日志说:
[cgi:error] [pid 13006] [client 141.101.104.167:28335] AH01215: suexec policy violation: see suexec log for more details: /home/myweb/public_html/cgi-bin/index.cgi
[cgi:error] [pid 13006] [client 141.101.104.167:28335] End of script output before headers: index.cgi
Suexec日志说:
[2016-04-23]: uid: (500/myweb) gid: (500/myweb) cmd: index.cgi
[2016-04-23]: error: target uid/gid (500/500) mismatch with directory (500/500) or program (0/0) or trusted user (0/10)
由于问题似乎来自suexec
我决定检查它,所以在WHM/Configure PHP and suEXEC
我发现它的状态为On,我禁用了它并尝试再次运行网站但没有任何变化,我再次启用它但网站仍然无法运行。
我去了/usr/local/apache/conf/httpd.conf
并删除了指令:
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup myweb myweb
</IfModule>
</IfModule>
但这并没有解决问题,网站仍显示500 internal server error
我将/home/myweb/public_html/cgi-bin/
的{{1}}权限从777
更改为755
,然后更改为775
,但问题仍然存在。
你能帮我解决这个问题。
答案 0 :(得分:-2)
将所有文件的权限更改为755
并享受!
问题是不合适的权限