Subversion over Apache2 as Just Another App Server on Debian Etch
This assumes you have already installed the subversion package by following the directions outlined here.
Install Apache2 and mod_dav_svn
In my case, I already had something running on port 80 (nginx handling requests to various app servers), so apache2 was set to “NO_START to 1 in /etc/default/apache2″. I’ll get back to that later when we configure /etc/apache2/ports.conf so that our apache2 instance is just another app server behind nginx.
Configure Apache2 for your repositories
Now edit /etc/apache2/sites-available/your-svn-apache2.conf and uncomment where appropriate (e.g. Location and DAV lines) and edit to suit. I changed “Location /svn” to “Location /projects” since my server’s domain will be “svn.mydomain” for example. I also opted to use SVNParentPath since I’ll be serving several repositories under /projects.
Make sure your repositories are readable and writeable for the www-data user. I’ve opted to use svn+ssh for commits rather than setup authentication.
Make our svn configuration load at apache2 start by creating the appropriate symlink:
$ sudo ln -s /etc/apache2/sites-available/your-svn-apache2.conf
Configure Apache2 to listen on another port besides 80
Edit /etc/apache2/ports.conf and change the number to the port you want it to listen on, edit /etc/default/apache2 to have NO_START = 0 and turn apache2 on with the following:
Assuming that you have your load balencer/proxy server listening on port 80 and that it is configured to direct requests for your svn repository over http to your apache2 server at the port specified in /etc/apache2/ports.conf, you should be good to go.
Enjoy,
Walter


May 10th, 2007 at 1:49 pm
[...] See this post for details. [...]