I want to be able to browse the svn dir from a website like and at the same time, be able to checkout from the repository via


First of all, install mod_dav_svn

Then in the apache config, I am using vhost for example

<VirtualHost *:80>
  DocumentRoot /home/data/
  # this is for svn
  <Location /svn.php>
    RewriteEngine on
    RewriteRule svn.php/([^/\.]+) /svn/$1 [L]
  <Location /svn>
    DAV svn
    # SVNPath /home/data/svn/
    SVNParentPath /home/data/svn
    # Limit write permission to list of valid users.
    # Require SSL connection for password protection.
    # SSLRequireSSL
    AuthType Basic
    AuthName "SVN repository"
    AuthUserFile /etc/httpd/conf.d/subversion.passwd
    Require valid-user

In my document root, /home/data/, I have a svn.php file soft-linked to /home/data/svn (the place where all svn repository are). As you can see from above, I also use a basic authentication mechanism for anyone who wishes to checkout from the repo.

Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.