enable svn over apache 2 server

I have already svn and apache 2 installed on my ubuntu server. Now I wanted to enable to use svn trough the apache 2 server. How can that be achieved?
1 answer

Solution for "enable svn over apache 2 server"

    1. install apache-svn-library

    apt-get install libapache2-svn
    2. create a directory where the svn files are stored

    mkdir /home/myuser/svn
    mkdir /home/myuser/repository
    3. Now we have to change the owner of this directories

    chown www-data:www-data -R /var/svn/repository
    4. Modify the /etc/apache2/mods-available/dav_svn.conf file by adding the following lines.

    SVNParentPath /var/svn/repository
    #SVNPath /var/svn/repository
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /etc/apache2/dav_svn.passwd
    Require valid-user
    5. Creates a svn password file and add a user with the username testuser.

    htpasswd2 -c /etc/apache2/dav_svn.passwd testuser
    6. Create svn repository with the apache 2 user

    su www-data
    svnadmin create /var/svn/repository/example
    7. Now restart apache 2. Before you have to logout the www-data user.

    /etc/init.d/apache2 restart