[aklug] Re: subversion / apache 301 woes.

From: Joshua J. Kugler <joshua@eeinternet.com>
Date: Tue Mar 23 2010 - 16:44:55 AKDT

On Tuesday 23 March 2010, Lee elucidated thus:
> 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>
> $ >

Your doc root is /var/www and your repo is at /var/www/repos, so Apache
doesn't know whether to serve the virtual location /repos or the
directory /var/www/repos, just like the quoted docs say.

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Mar 23 16:45:14 2010

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