[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn: PROPFIND of '/project2': 301 Moved Permanently (http://svn.mydomain.com)

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-12-21 18:57:45 CET

On Dec 21, 2006, at 11:14, thomas Armstrong wrote:

> Using Subversion 1.4.2 (r22196) + Apache 2.0.59 on FC6, I get this
> error
> message when trying to checkout a project:
> -------------------------------
> []# svn --username john --password foo co http://svn.mydomain.com/
> project2
> svn: PROPFIND request failed on '/project2'
> svn: PROPFIND of '/project2': 301 Moved Permanently (http://
> svn.mydomain.com)
> ---------------------------------
>
> If I visit http://svn.mydomain.com/project2, I get a right webpage
> (I think):
> --------------
> Revision 0: /
> Powered by Subversion version 1.4.2 (r22196).
> --------------
> and I'm required to type user (john) and password (foo)
>
> This is my 'httpd.conf'
> ------------------------
> <VirtualHost svn.mydomain.com>
> ServerName svn.mydomain.com
> DocumentRoot /home/svn-repos
> <Location /project2>
> DAV svn
> SVNPath /home/svn-repos/project2/trunk
> # our access control policy
> AuthzSVNAccessFile /etc/svn-access-file
> AuthType Basic
> AuthName "Authorization Realm"
> AuthUserFile /etc/svn-auth-file
> Require valid-user
> </Location>
> </VirtualHost>
> ----------
>
> What am I doing wrong? Thank you very much.

Do not locate your repositories under your DocumentRoot. Either put
your repositories somewhere other than /home/svn-repos, or set your
DocumentRoot to something other than /home/svn-repos.

Also, why have you set SVNPath to /home/svn-repos/project2/trunk?
Have you really created a repository inside /home/svn-repos/project2
called "trunk"? That would be very unusual. The recommended layout of
trunk / branches / tags is designed to be created within a single
repository. The whole point is to be able to copy the trunk to a
branch or tag, and you can only copy within a repository, not between
repositories.

Also, the fact that you're showing a project2 suggests that you have
other projects as well. Perhaps you'd prefer the SVNParentPath
directive so you can add an arbitrary number of repositories without
having to revisit the Apache configuration?

I'd suggest this setup:

<VirtualHost *:80>
        ServerName svn.mydomain.com
        DocumentRoot /home/svn-repos/docroot
        <Location /svn>
                DAV svn
                SVNParentPath /home/svn-repos/repositories
                # our access control policy
                AuthzSVNAccessFile /etc/svn-access-file
                AuthType Basic
                AuthName "Authorization Realm"
                AuthUserFile /etc/svn-auth-file
                Require valid-user
        </Location>
</VirtualHost>

Now you can create as many repositories under /home/svn-repos/
repositories as you like. You can access them via http://
svn.mydomain.com/svn/project1 and so forth. Within each repository,
you can use "svn mkdir" to create the directories trunk / branches /
tags. Your document root is in a separate place from where the
repositories are. You can use the docroot directory to store
favicon.ico, robots.txt and any other items that by convention or
standard must be at the root of the URL space. (If you use
"<Location />" you lose the ability to use such files.) If you don't
want or need to use such files, you can just set the DocumentRoot to
an empty directory somewhere. (My system has /var/empty.) If you want
favicon.ico, robots.txt and any other items that might be in your
document root to be elsewhere, such as within a docroot *repository*
that you might set up for that purpose, you might be able to set up
some Alias directives mapping /favicon.ico to /svn/docroot/
favicon.ico and so forth.

-- 
To reply to the mailing list, please use your mailer's Reply To All  
function
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 21 19:00:15 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.