Setup Subversion on the Apache HTTP server

-EDIT-
For a easy mini how-to for setting up Apache2 with SVNis see /usr/share/doc/packages/subversion for the full documentation. Is easier than what's below, but i'll leave the info below for info sake...
-EDIT-

Setup Subversion on the Apache HTTP server

Changes to http.conf

LoadModule dav_module /usr/lib/apache2/mod_dav.so
LoadModule dav_svn_module /usr/lib/apache2/mod_dav_svn.so

#Subversion Repository
< Location /blabbermouth >
DAV svn
SVNPath /usr/svnrepos

# how to authenticate a user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/svn-auth-file

# For any operations other than these, require an authenticated user.
< LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>


Make Changes in subversion's /conf/passwd file to allow read/write/none access..

[/]
* = r
[blabbermouth:/]
user1=rw
user2=rw

Allows anyone to read ALL repositories and user1 and user2 to write to the 'blabbermouth' repository.

Remeber to give the UserID that Apache runs as permission to write to your svn folder. If your svn repos is owned by a user 'svn' and group 'snv' and if Apache runs as 'wwwrun' (check the httpd.conf or uid.conf) then in the console type:
# groups wwwrun to list the groups that wwwrun belongs to.
# usermod -G svn wwwrun will add wwwrun to the svn group. if 'wwwrun' belongs to anyother groups (besides the primary group 'www') then mention them alongside svn.

0 comments: