SVN(mod_dav)403 FORBIDDEN OPTION请求

时间:2008-12-21 20:48:51

标签: linux svn apache debian

所以我正在尝试使用带有apache2的mod_dav设置一个subversion服务器,但是当我尝试连接时,它给了我一个403 FORBIDDEN错误。这是我的默认虚拟主机文件

NameVirtualHost *:443
NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName hcs-dev

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
    <Location /repos/>
           DAV On
           DAV svn

           AuthzSVNAccessFile /svn_authz
           Satisfy Any
           Require valid-user

           SVNParentPath /repos/
           AuthType Digest
           AuthName "stevesvn"
           AuthUserFile /dig-pw
       </Location>
</VirtualHost>
<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    ErrorLog /var/log/apache2/error.log
    <Location /repos/>
           DAV On
           DAV svn

           AuthType Basic
           AuthName "stevesvn"
           AuthUserFile /svn-pw.pw
           AuthzSVNAccessFile /svn_authz
           Require valid-user

           SVNParentPath /repos/
       </Location>
</VirtualHost>

关于可能导致这种情况的任何想法?

2 个答案:

答案 0 :(得分:4)

在您向Vinko发送的后续消息中,您说明错误不是403,而是401.很可能是用户输入的密码不正确,或密码文件本身未列出,或密码文件首先缺少。请注意,您使用/ dig-pw作为非ssl的密码文件,并使用/svn-pw.pw作为ssl情况。虽然拥有两组不同的密码文件可能没问题,但是将它们存储在硬盘的根目录中是令人费解的。同样适用于AuthzSVNAccessFile。

答案 1 :(得分:1)

检查错误日志,对于浏览器上显示的每个错误,日志中都有匹配的条目,通常会提供更多信息。

查看Apache httpd's wiki了解详情。