views:

1878

answers:

2

So I'm trying to setup a subversion server using mod_dav with apache2 but when I try to connect it gives me a 403 FORBIDDEN error. Here's my default virtual host file

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>

Any ideas as to what could be causing this?

A: 

Check the error log, for every error displayed on your browser there is a matching entry in the log that usually gives more information.

Check Apache httpd's wiki for more information.

Vinko Vrsalovic
192.168.1.1 - steve [21/Dec/2008:17:32:10 -0500] "OPTIONS /repos/bantr/trunk HTTP/1.1" 401 600 "-" "SVN/1.5.4 (r33841) neon/0.28.2"That's what I'm seeing in access.log
Vestonian
Now check the error.log file
Vinko Vrsalovic
+2  A: 

In your follow-up message to Vinko, you state that the error isn't 403, but 401. Most likely, the user entered the incorrect password, or isn't listed in the password file itself, or the password file is missing in the first place. Notice that you use /dig-pw as the password file for non-ssl, and /svn-pw.pw for the ssl case. While it might be OK to have two different sets of password files, it is puzzling that you store them in the root directory of your hard disk. Likewise for AuthzSVNAccessFile.

Martin v. Löwis