Subversion provides an Apache module, mod_dav_svn, that allows Apache to access Subversion repositories. It requires two other modules also: mod_dav and mod_dav_fs and they are loaded with these directives:
LoadModule mod_dav libexec/apache22/mod_dav.so LoadModule mod_dav_fs libexec/apache22/mod_dav_fs.so LoadModule mod_dav_svn libexec/apache22/mod_dav_svn.so
After we load the modules, we need to specify the location of the Subversion repository. This can be done with SVNPath directive inside a <Location> directive:
<Location /svn> DAV svn SVNPath /usr/local/www/svn.simple/repo </Location>
Since the httpd processes need write access to the repository it should be owned by the user and the group which run apache:
# cd /usr/local/www/svn.simple # svnadmin create repo # chown -R www:www repo # chmod -R o-rwx repo
Now we can access the repository using at http://localhost/svn:
$ svn import -m "initial import" http://localhost/svn/helloworld $ svn list http://localhost/svn $ svn co http://localhost/svn/helloworld
The repository can be even previewed from a simple browser at
http://localhost/svn.