Web interface to Subversion: WebSVN

Configuration

by ross at 07:23:25 on October 28, 2011

Install subversion if you need to.

Install

# cd /usr/ports/devel/websvn
# make install clean
# cd /usr/local/www/websvn/include
# cp distconfig.php config.php

Edit /usr/local/www/websvn/include/config.php:

$config->parentPath("/home/svn/repos");
$config->allowDownload();
$config->setMinDownloadLevel(0);
$config->useAuthenticationFile('/home/svn/websvn.authz');

Create /home/svn/websvn.authz:

[groups]
me = ross
group = user1, user2

[repository:/]
@me = rw
@group = r
* =

Create /home/svn/websvn.passwd:

# htpasswd -c /home/svn/websvn.passwd anonymous
# htpasswd /home/svn/websvn.passwd ross
# htpasswd /home/svn/websvn.passwd user1
# htpasswd /home/svn/websvn.passwd user2

Adjust permissions:

# chown svn:svn /home/svn/websvn.*
# chmod 600 /home/svn/websvn.*

/usr/local/etc/apache22/Includes/svn.conf:

<VirtualHost *:80>
        # If you are running apache22-itk-mpm:
        AssignUserID svn svn
        # Otherwise comment it out and add user www to svn group

        ServerName svn.example.com
        ServerAdmin root@example.com
        DocumentRoot "/usr/local/www/websvn"
        ErrorLog "/var/log/httpd-svn.example.com-error.log"
        CustomLog "/var/log/httpd-svn.example.com-access.log" combined

        <Location />
                AuthType Basic
                AuthName "You can login as 'anonymous' with no password"
                AuthUserFile /home/svn/websvn.passwd
                Require valid-user
        </Location>
</VirtualHost>

<Directory "/usr/local/www/websvn">
        Options FollowSymLinks Indexes
        AllowOverride All
        Order Allow,Deny
        Allow from all
</Directory>
Comments