cgi - “违反 suexec 政策”会阻止我的网站运行吗?

标签 cgi internal-server-error suexec

当我尝试运行我的网站时,它显示 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/ 的权限来自 777755然后到 775但问题仍然存在。

你能帮我解决这个问题吗。

最佳答案

将权限更改为 755为您的所有文件

享受 !

问题是权限不合适

关于cgi - “违反 suexec 政策”会阻止我的网站运行吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36809470/

相关文章:

c++ - 为 CGI 和 WPF 开发混合的 C++ 和 C++/CLI

php - 从 php 运行 python 脚本

error-handling - 我的网站页面上的500 Internal Server Error

apache - Redhat "httpd"无法启动了。显示 "suEXEC"和 "SELinux"通知

php - 如何从 apache Web 服务器中删除 SUEXEC?

Javascript - 使用变量获取数组的一部分

web-services - 如何在 Ubuntu 中部署 gSOAP Web 服务?

apache - Perl 库无法在 WampServer 上运行

reactjs - 使用 React Router 刷新页面或手动输入 URL 时为 "Internal Server Error"

linux - Apache userdir + suEXEC + fcgid 无法识别点分隔的用户帐户