LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 768|回复: 3

一个关于Apache的弱智问题,请大家帮帮忙

[复制链接]
发表于 2004-4-12 18:46:25 | 显示全部楼层 |阅读模式
我在/var/www/cgi-bin/ 下放了一个first.cgi文件:

#!/usr/bin/perl
        print "Content-type: text/html\r\n\r\n";
        print "Hello, World.";


httpd.conf里的 AddHandler cgi-script *cgi前#已经去掉,

但在浏览器输入http://****/cgi-bin/first.cgi
之后总出现以下错误:

Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: first.cgi
If you think this is a server error, please contact the webmaster
Error 500


我是个初学者,请大家多多指教
发表于 2004-4-12 18:51:01 | 显示全部楼层
看看apache的error log
 楼主| 发表于 2004-4-12 19:00:12 | 显示全部楼层
我刚看了apache的error log,没什么实际信息

[Mon Apr 12 18:38:27 2004] [error] [client 162.105.17.141] Premature end of script headers: first.cgi

[Mon Apr 12 18:38:36 2004] [error] [client 162.105.17.141] Premature end of script headers: first.pl

[Mon Apr 12 18:38:41 2004] [error] [client 162.105.17.141] Premature end of script headers: first.cgi



请大家帮忙,谢谢
发表于 2004-4-12 20:46:01 | 显示全部楼层
你的两个\r似乎有点多余。
另外,检查一下你的httpd.conf里面的cgi-bin目录的权限,Options是否开放了ExecCGI。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表