免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 903 | 回复: 2
打印 上一主题 下一主题

http.conf中cgi_mod问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-19 01:48 |只看该作者 |倒序浏览
我在httpd.conf中
  
    118 <IfModule prefork.c>
    119 StartServers         5
    120 MinSpareServers      5
    121 MaxSpareServers     10
    122 MaxClients         150
    123 MaxRequestsPerChild  0
    124 #LoadModule cgi_module modules/mod_cgi.so
    125 </IfModule>
    126 <IfModule prefork.c>
    127 LoadModule cgi_module modules/mod_cgi.so
    128 </IfModule>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin"

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

AddHandler cgi-script .cgi .pl

[root@localhost ~]# service httpd restart
Syntax error on line 127 of /usr/local/apache/conf/httpd.conf:
module cgi_module is built-in and can't be loaded
报这样的错,是怎么回事,我在IE里cgi-bin
Forbidden
You don't have permission to access /cgi-bin/ on this server.


--------------------------------------------------------------------------------

Apache/2.0.53 (Unix) PHP/5.0.4 mod_perl/2.0.0 Perl/v5.8.5 Server at 192.168.0.5 Port 80
但是cgi-bin是755的权限,且上一级目录也是这个权限,这是怎么回事。请高手指点。

论坛徽章:
0
2 [报告]
发表于 2005-11-19 04:27 |只看该作者
没法直接回答你的问题, 但是下面做法能帮你搞清mod_cgi问题来源。

comment out these lines
##<IfModule prefork.c>
##  LoadModule cgi_module modules/mod_cgi.so
##</IfModule>


uncomment out these lines:
<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1  
</Location>

service httpd restart

use a browser type "http://yoursever/server-info"

如果 mod_cgi.c 已经有了, 你就不需要再load.

use is not allowed to access cgi-bin directory, but you can execute cgi script if you know the script name.
http://yourserver/cgi-bin/yourscriptname.pl

John

论坛徽章:
0
3 [报告]
发表于 2005-11-19 09:30 |只看该作者
我试了,不行呀,我在这个文件中有一个主页了
<Directory "/var/www">
  Options Indexes FollowSymLinks
  AllowOverride None
    Order allow,deny
    Allow from all

</Directory>
我/var/www/下,我把公司的网站放在这里,我在IE里输入192.168.0.5就可以进入公司主页。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP