2008-12-21 85 views
2

所以我试图安装使用具有Apache2的mod_dav的Subversion服务器,但是当我尝试连接它给了我一个403 Forbidden错误。这里是我的默认虚拟主机文件SVN(mod_dav的)403 FORBIDDEN OPTION请求

 
NameVirtualHost *:443 
NameVirtualHost *:80 
<VirtualHost *:80> 
    ServerAdmin [email protected] 
    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> 

任何想法可能是什么原因造成这种情况?

+0

你故意使用不同的密码文件吗?/dig-pw为:80,/svn-pw.pw为:443?故意放置在您的系统上是否被读取? Apache可以正确读取吗? – mark 2008-12-22 14:56:25

回答

4

在你的后续消息Vinko,您指出的错误不是403,而是401最有可能的,用户输入的密码不正确,或者没有在密码文件本身列出,或密码文件首先丢失。请注意,您将/ dig-pw用作非ssl的密码文件,对于ssl情况使用/svn-pw.pw。虽然可能有两组不同的密码文件,但令人费解的是,您将它们存储在硬盘的根目录中。同样适用于AuthzSVNAccessFile。

1

检查错误日志,用于在浏览器上显示的每个错误存在,通常提供了更多的信息,在日志中匹配的条目。

检查Apache httpd's wiki以获取更多信息。

+0

192.168.1.1 - 史蒂夫[21/DEC/2008:17:32:10 -0500] “OPTIONS /回购/ bantr /中继线HTTP/1.1” 401 600 “ - ”“SVN/1.5.4(r33841)氖/ 0.28 .2" 这就是我看到access.log里 – 2008-12-21 22:33:34