当我登录ssh并运行cgi时:一切看起来都很好

./modulev2.cgi
Content-type: text/html
Cache-Control: no-cache, no-store
Pragma: no-cache

当我试图通过http调用它时:http://www.capuccino.fr/cgi-bin/modulev2.cgi
我有一个讨厌的:
Internal Server Error

我试着把chmod777放在cgi-bin和home上。。没有成功
查看日志时:
cgi日志:
[2013-07-22 11:21:12]: uid: (1000/capuccin) gid: (100/users) cmd: modulev2.cgi
[2013-07-22 11:21:12]: target uid/gid (1000/100) mismatch with directory (510/100) or program (0/0)

和错误日志
[Mon Jul 22 11:21:03 2013] [error] [client 91.7.112.187] suexec policy violation: see suexec log for more details
[Mon Jul 22 11:21:03 2013] [error] [client 91.7.112.187] Premature end of script headers: modulev2.cgi

我也试着改变chown并在cgi.log中得到了这个
[2013-07-22 11:56:36]: target uid/gid (1000/100) mismatch with directory (510/100) or program (1000/100)
[2013-07-22 11:56:39]: uid: (1000/capuccin) gid: (100/users) cmd: modulev2.cgi

你知道怎么解决吗?

最佳答案

似乎有错误的文件/文件夹权限。
尝试将权限设置为775,并确保文件和文件夹的所有者正确。将owner设置为与web服务器相同(类似于www data或apache)。

关于linux - linux:在Apache中运行cgi-bin模块时出现错误500,而不是从ssh获得,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17784270/

10-11 22:37
查看更多