I have a problem to correctly configure apache / subversion and mod_dav in openSUSE 11.2
I have setup a virtual host on my home server (because I need to access it from the Internet), that should be a subversion server.
The subversion root directory is the
/srv/svn/repos
I plan to use a separate directory for each project.
So, the svn tree will be
- /srv/svn/repos/project1/…
- /srv/svn/repos/project2/…
- /srv/svn/repos/project3/…
Apache serves the web pages (actually the directories) but since the documentroot and the SVN root are the same, it cannot handle the SVN repositories correctly.
So, I re-read the Setting up a Subversion server using Apache2 - openSUSE how-to and followed it’s suggestion. (Use a Location outside the document root)
Anyway, the problem is that I have a 404 error, which of course is normal, since there is no alias set for the /rep location I use.
The apache configuration is:
NameVirtualHost *:8080>
<VirtualHost *:8080>
ServerName svn.home
ServerAdmin webmaster@server.home
DocumentRoot /srv/www
#Alias /rep/ /srv/svn/repos/
<Location /rep >
Allow from all
Dav On
SVNParentPath /srv/svn/repos
SVNListParentPath On
AuthType Digest
AuthDigestAlgorithm MD5
AuthName "svnadmins"
AuthDigestDomain /
AuthDigestProvider file
AuthUserFile /srv/www/.htpasswd
Require valid-user
</Location>
ErrorLog /var/log/apache2/svn.error
TransferLog /var/log/apache2/svn.access
</VirtualHost>
So, without the Alias directive the http://server.home:8080/repos returns a 404 error and the log files say that the /srv/www/rep directory does not exists (correct).
If I set the Alias directive, then I have a forbidden (403) error, since no index file exists.
But, the most important thing is that the svn is not working. When I try to create a new directory with the svn command, I have the following error:
svn mkdir http://localhost:8080/rep/sites/test -m "Repository Creation"
svn: Repository moved permanently to 'http://localhost:8080/rep/sites/'; please relocate
So, how do I correctly setup apache?