Linux – SVN (mod_dav) 403 FORBIDDEN OPTION request

apachedebianlinuxsvn

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?

Best Solution

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.

Related Question