Httpd – subversion on apache – checkout failed: 405 Method Not Allowed

apache-2.2httpdsvnwebdav

I try to setup subversion on an apache server. I followed this guide:
[http://wiki.centos.org/HowTos/Subversion][1]

If I try to checkout afterwards with Tortoise SVN a project I get the following Error:

Unexpected HTTP status 405 'Method Not Allowed' on '/repos

If I try to use the svn client on the linux server itself I get the follwing error:

svn: Server sent unexpected return value (405 Method Not Allowed) in response to OPTIONS request for 'https://server.ch/repos'

My current configuration on the apache server look like this:

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<VirtualHost *:443>
...
  <Directory "/var/www/svn/">
    Order allow,deny
    Allow from all
    AllowOverride all
    AuthType Basic
    AuthName "Authorization Realm"
    AuthUserFile /etc/subversion/svn-auth-conf
    Require valid-user
  </Directory>
  <Location /repos>
    DAV svn
    SVNParentPath /var/www/svn/repos
    SVNListParentPath on
    SSLRequireSSL
    AuthType Basic
    AuthName "Authorization Realm"
    AuthUserFile /etc/subversion/svn-auth-conf
    Require valid-user
  </Location>
</VirtualHost>

Thank you for any suggestion or help in advance

regards
Mark

Best Answer

I found the issue, the Location and SVNParentPath has been wrongly set. I followed the solution here [http://www.wandisco.com/svnforum/threads/35525-Stuck-with-error-%E2%80%9C405-Method-Not-Allowed%E2%80%9D][1]

the correct config on apache looks like this:

<VirtualHost *:443>
  ...
  <Location /svn>
    DAV svn
    SVNParentPath /var/www/svn
    SVNListParentPath on
    SSLRequireSSL
    AuthType Basic
    AuthName "Authorization Realm"
    AuthUserFile /etc/subversion/svn-auth-conf
    Require valid-user
  </Location>
</VirtualHost>
Related Topic