LinuxSir.cn,穿越时空的Linuxsir!

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

关于配置Apache对CGI支持的问题?

[复制链接]
发表于 2004-6-11 13:41:24 | 显示全部楼层 |阅读模式
关于配置Apache对CGI支持的问题?
系统用的是RedHat9,Apache用的是系统自带的Apache/2.0.40.
我现在想要配置个WEB服务器,并且实现支持CGI程序.
HTTP服务已经配置好了,也已经能够访问了.
可是在配置对CGI支持的时候碰上问题了.
不知道问题出在那里,特来求助,各位帮忙看下啊,谢谢@
我已经编辑了/etc/httpd/conf/httpd.conf
其中关于CGI部分我作的修改是这样的:

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
#这个是默认的,目录没有作修改.CGI就放在这个目录下面.

AddHandler cgi-script .cgi .pl

<Directory "/var/www/cgi-bin">
        AllowOverride All
        Options All
        Allow from  all
        Order allow,deny
</Directory>

好像就是对以上三个地方作修改啊.
可是现在我并不能访问CGI目录啊,访问CGI目录的时候(http://192.168.1.110/cgi-bin/
出来以下提示:

Forbidden

You don't have permission to access /cgi-bin/ on this server.
Apache/2.0.40 Server at XiaoMa Port 80
-----------------------------------

访问这个目录下面的网页的时候就会出来500错误(http://192.168.1.110/cgi-bin/info.cgi

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.0.40 Server at XiaoMa Port 80

-----------------------------------
日志里面的记录是这样的:
[error] [client 192.168.1.110] attempt to invoke directory as script: /var/www/cgi-bin/
[error] [client 192.168.1.110] Premature end of script headers: help.cgi
[error] [client 192.168.1.110] attempt to invoke directory as script: /var/www/cgi-bin/
[warn] child process 3161 still did not exit, sending a SIGTERM
[warn] child process 3164 still did not exit, sending a SIGTERM
[otice] caught SIGTERM, shutting down
[notice] Digest: generating secret for digest authentication ...
[notice] Digest: done
[notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations
[error] [client 192.168.1.110] attempt to invoke directory as script: /var/www/cgi-bin/
[error] [client 192.168.1.110] Premature end of script headers: info.cgi

-----------------------------------:help :help
各位大侠请帮忙看下了啊,谢谢@
对于目录/程序的权限我作了修改,都是755.
发表于 2004-6-11 14:29:56 | 显示全部楼层
检查模块和perl有没设置好
发表于 2004-6-27 13:12:56 | 显示全部楼层
属性呢。cgi程序ascii方式上传。
在命令行执行出错信息是什么呀?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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