LinuxSir.cn,穿越时空的Linuxsir!

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

如何配置才能使Apache支持CGI/WebDAV?

[复制链接]
发表于 2004-7-7 16:21:12 | 显示全部楼层 |阅读模式
如何配置才能使Apache支持CGI/WebDAV?

我的系统用的是reahat9 ,Apache用的是系统自带的Apache/2.0.40 (Red Hat Linux)
其中/cgi-bin/目录的权限为:755

下面是我的apache里关于CGI/WebDAV的一点配置文件:
----------------------------------------
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.

ScriptAlias /cgi-bin/ "/var/www/html/cgi-bin/"

# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi .pl

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


# Allow server status reports, with the URL of http://servername/server-status
# Change the ".your-domain.com" to match your domain to enable.
#
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 192.168.1.110
                                                                                
        AuthType Basic
        AuthName "Admin"
        AuthUserFile /var/www/passwd/marengen
        AuthGroupFile /var/www/passwd/admingrp
        require group admin
        Satisfy any
</Location>



<Directory "/var/www/html">
        Options Indexes Includes FollowSymLinks
                                                                                
        AllowOverride None
        Allow from all
                                                                                
        Dav On
        AuthType Basic
        AuthName "Admin"
        AuthUserFile /var/www/passwd/marengen
        AuthGroupFile /var/www/passwd/admingrp
                                                                                
                                                                                
<LimitExcept GET OPTIONS>
                                                                                
        require group admin
                                                                                
</LimitExcept>

----------------------------------------
问题是:现在我一访问/cgi-bin/目录,就会出来Forbidden提示:

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

----------------------------------------
一访问这目录下面的文件,就会有出错提示:

http://192.168.1.110/cgi-bin/hello.cgi

Internal Server Error


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


Please contact the server administrator, marengen@msn.com 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


----------------------------------------
日志里的记录:

[Wed Jul 07 15:41:50 2004] [error] [client 192.168.1.110] attempt to invoke directory as script: /var/www/html/cgi-bin/
[Wed Jul 07 15:43:09 2004] [error] [client 192.168.1.110] Premature end of script headers: hello.cgi

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

而关于WebDAV,我在WINDOWS客户端下面连上服务器,输入用户名/密码的时候
系统会提示我用户名/密码名错误。
而我的这二个文件应该是没有错误的
AuthUserFile /var/www/passwd/marengen
AuthGroupFile /var/www/passwd/admingrp
因为在访问别的要用到这二个文件的面页时
我输入相关的用户名/密码就能访问。


不知道问题出在那里??各位老大帮忙看下啊,非常感谢!
能不能给个配置文件看下?
 楼主| 发表于 2004-7-8 16:10:12 | 显示全部楼层
自己的贴子自己顶@
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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