简体   繁体   English

linux:在Apache中运行cgi-bin模块时出现错误500,而不是从ssh获得

[英]linux: get error 500 at running cgi-bin module in apache, not from ssh

When I login in ssh and run my cgi : everything seems ok 当我登录ssh并运行我的cgi时:一切似乎正常

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

When I try to call it through http: http://www.capuccino.fr/cgi-bin/modulev2.cgi I got a nasty: 当我尝试通过http:http: //www.capuccino.fr/cgi-bin/modulev2.cgi调用它时,我很讨厌:

Internal Server Error

I tried to put chmod777 on cgi-bin, on home etc.. with no success 我试图将chmod777放在cgi-bin,家庭等上。没有成功

When looking at logs: cgi.log: 查看日志时:cgi.log:

[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)

and error_log 和error_log

[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

I also tried to change chown and got this in cgi.log 我也尝试过更改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

Any idea on how to fix that ? 关于如何解决这个问题的任何想法?

Seems like wrong file/folder permissions. 好像是错误的文件/文件夹权限。

Try to set permission to 775 and ensure that the owner of the file and folder is correct. 尝试将权限设置为775,并确保文件和文件夹的所有者正确。 Set owner to the same your webserver (something like www-data or apache ). 将所有者设置为与您的Web服务器相同(例如www-dataapache )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM