LinuxSir.cn,穿越时空的Linuxsir!

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

加载CGI模块后说没有权限访问此页面?

[复制链接]
发表于 2004-1-13 10:51:44 | 显示全部楼层 |阅读模式
自己编译的APACHE,在httpd.conf中已经加载了CGI模块,并且也已经配置好了

配置如下:
#
ScriptAlias /cgi/ "/opt/apache/cgi-bin/"

<IfModule mod_cgid.c>
#
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# for setting UNIX socket for communicating with cgid.
#
#Scriptsock            logs/cgisock
</IfModule>

#
# "/opt/apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/opt/apache/cgi-bin/">
    AllowOverride None
    Options ExecCGI -Indexes
    Order allow,deny
    Allow from all
</Directory>

# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi .pl

#

自己也在/cgi-bin/目录下建立了一个index.cgi文件,设定权限如下:
#chown root.root /opt/apahce/cgi-bin/
#chmod 711 /opt/apahce/cgi-bin/index.cgi
可是我用浏览访问自己建立的这个index.cgi文件时(http://自己建立的域名/cgi/),却老是提示我没有访问权限?
请问这是怎么回事呢?
 楼主| 发表于 2004-1-13 17:01:44 | 显示全部楼层
自己顶一下!!!!!!!
发表于 2004-1-13 18:24:48 | 显示全部楼层
我的尝试解答:

#chown root.root /opt/apahce/cgi-bin/
#chmod 711 /opt/apahce/cgi-bin/index.cgi

不知你的apache中指定的user和group是什么帐户,觉得你的这个cgi目录的权限也应该和apache中的帐户保持一致,然后在权限上可以设置为755。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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