[aklug] subversion / apache 301 woes.

From: Lee <lee@afabco.org>
Date: Tue Mar 23 2010 - 16:34:02 AKDT

am trying to get subversion set up to work. I've followed the subversion folks' book
chapter 6 recommendation for hosting central subversion repositories by using apache.

Which was probably my first mistake, following the directions. But I digress.

anyway:

apache and repository is set up on a remote machine called 'netmon' It's a centos5 machine.

 $ > svn co http://netmon/repos
svn: PROPFIND request failed on '/repos'
svn: PROPFIND of '/repos': 301 Moved Permanently (http://netmon)
 $ >

from the subversion FAQ http://subversion.apache.org/faq.html#http-301-error :

I can see my repository in a web browser, but 'svn checkout' gives me an error about
"301 Moved Permanently". What's wrong?

It means your httpd.conf is misconfigured. Usually this error happens when you've
defined the Subversion virtual "location" to exist within two different scopes at the
same time.

For example, if you've exported a repository as <Location /www/foo>, but you've also set
your DocumentRoot to be /www, then you're in trouble. When the request comes in for
/www/foo/bar, apache doesn't know whether to find a real file named /foo/bar within your
DocumentRoot, or whether to ask mod_dav_svn to fetch a file /bar from the /www/foo
repository. Usually the former case wins, and hence the "Moved Permanently" error.

The solution is to make sure your repository <Location> does not overlap or live within
any areas already exported as normal web shares.

It's also possible that you have an object in the web root which has the same name as
your repository URL. For example, imagine your web server's document root is /var/www
and your Subversion repository is located at /home/svn/repo. You then configure Apache
to serve the repository at http://localhost/myrepo. If you then create the directory
/var/www/myrepo/ this will cause a 301 error to occur.

OK....

 $ > cat /etc/httpd/conf.d/subversion.conf

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /repos>
   DAV svn
   SVNParentPath /var/www/repos
   SVNListParentPath On

</Location>
 $ >

 
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Mar 23 16:34:16 2010

This archive was generated by hypermail 2.1.8 : Tue Mar 23 2010 - 16:34:16 AKDT