You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jerome Asselin <je...@crchum.qc.ca> on 2005/09/16 19:43:45 UTC

request failed: 301 Moved Permanently

Hello,

For the last two days, I've been trying to get started with
subversion-1.1.1-2.1 on RHEL 4 AS. I run the following without any error
until the last two svn commands.

su -
cd /var/www/html
mkdir svn
cd svn
svnadmin create repos
chown -R apache:apache /var/www/html/svn

wget https://localhost/svn/repos -q -O - # Displays "Revision 0: ..."

$ svn checkout https://localhost/svn/repos wc
svn: PROPFIND request failed on '/svn/repos'
svn: PROPFIND of '/svn/repos': 301 Moved Permanently (https://localhost)
$ svn mkdir https://localhost/svn/repos/branches
svn: OPTIONS request failed on '/svn/repos'
svn: OPTIONS of '/svn/repos': 301 Moved Permanently (https://localhost)
svn: Your commit message was left in a temporary file:
svn:    'svn-commit.tmp'

Has anybody seen this behavior before? What am I doing wrong?

My apache config includes this:

<Location /svn>
  DAV svn
  SVNParentPath /var/www/html/svn
  <LimitExcept >
   order allow,deny
   allow from all
  </LimitExcept>
</Location>

Thanks for any help,
Jerome

-- 

Jerome Asselin, Agent de recherche
CHUM -- Centre de recherche
3875 rue St-Urbain, 3e etage // Montreal QC  H2W 1V1
Tel.: 514-890-8000 Poste 15914; Fax: 514-412-7106


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: request failed: 301 Moved Permanently

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 19, 2005, at 13:15, Erik Huelsmann wrote:

>>> http://subversion.tigris.org/faq.html#http-301-error
>
> Ok. What I think the FAQ entry means is that the SVNPath directive
> points to /www/www/foo, so that both the location and the DocumentRoot
> resolve to the exact same physical path... I agree that it's not very
> clear from the entry text.
>
> Do you have any idea what happens if you try it my way? Or can you
> test and report back? I'll update the entry with your findings.

Sorry, I don't have time to test this right now. Maybe someone else  
does?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: request failed: 301 Moved Permanently

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/19/05, Jerome Asselin <je...@crchum.qc.ca> wrote:
> On Mon, 2005-09-19 at 13:15 +0200, Erik Huelsmann wrote:
> > On 9/19/05, Ryan Schmidt <su...@ryandesign.com> wrote:
> > > On Sep 18, 2005, at 23:21, Erik Huelsmann wrote:
> > >
> > > > http://subversion.tigris.org/faq.html#http-301-error
> > >
> > > As an Apache administrator, I gotta say I'm pretty baffled by what's
> > > being said there:
> > >
> > > > 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.
> > >
> 
> Thanks for the FAQ link! I've managed to get it to work by placing my
> svn repository outside the scope of the DocumentRoot. That way, I CANNOT
> get a listings the repositories at https://archivos/svn,

Yup. That's correct, but: I just saw a commit pass by which makes this
possible in 1.3 with an Apache configurantion directive!

> but I can check
> out the repository with:
> 
>   svn checkout https://localhost/svn/repos wc
> 
> My apache settings are:
> 
>   DocumentRoot "/var/www/html"
>   <Location /svn>
>     DAV svn
>     SVNParentPath /var/www/svn
>     # etc.
>   </Location>
bye,

Erik.

Re: request failed: 301 Moved Permanently

Posted by Jerome Asselin <je...@crchum.qc.ca>.
On Mon, 2005-09-19 at 13:15 +0200, Erik Huelsmann wrote:
> On 9/19/05, Ryan Schmidt <su...@ryandesign.com> wrote:
> > On Sep 18, 2005, at 23:21, Erik Huelsmann wrote:
> > 
> > > http://subversion.tigris.org/faq.html#http-301-error
> > 
> > As an Apache administrator, I gotta say I'm pretty baffled by what's
> > being said there:
> > 
> > > 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.
> > 

Thanks for the FAQ link! I've managed to get it to work by placing my
svn repository outside the scope of the DocumentRoot. That way, I CANNOT
get a listings the repositories at https://archivos/svn, but I can check
out the repository with:

  svn checkout https://localhost/svn/repos wc

My apache settings are:

  DocumentRoot "/var/www/html"
  <Location /svn>
    DAV svn
    SVNParentPath /var/www/svn
    # etc.
  </Location>

Cheers,
Jerome

-- 
Veuillez mettre à jour mon courriel dans votre carnet d'adresses.
Please update my email in your address book.

Jerome Asselin, Agent de recherche, RHCE
CHUM -- Centre de recherche
3875 rue St-Urbain, 3e etage // Montreal QC  H2W 1V1
Tel.: 514-890-8000 Poste 15914; Fax: 514-412-7106


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: request failed: 301 Moved Permanently

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/19/05, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Sep 18, 2005, at 23:21, Erik Huelsmann wrote:
> 
> > http://subversion.tigris.org/faq.html#http-301-error
> 
> As an Apache administrator, I gotta say I'm pretty baffled by what's
> being said there:
> 
> > 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.
> 
> There are so many things wrong with this entry, I barely know where
> to begin. Apache "doesnt't know" what to do and will therefore
> "usually" do it this certain way? No, sorry; I don't buy that: Apache
> is not a random number generator. Apache will either always do it one
> way, or always another, but it won't switch between them on a whim.
> 
> To the rest of it, let's try to construct this example the FAQ entry
> seems to be talking about.
> 
> <VirtualHost *:80>
>     ServerName example.com
>     DocumentRoot /www
>     <Location /www/foo>
>         SVNPath /data/svn

Ok. What I think the FAQ entry means is that the SVNPath directive
points to /www/www/foo, so that both the location and the DocumentRoot
resolve to the exact same physical path... I agree that it's not very
clear from the entry text.

Do you have any idea what happens if you try it my way? Or can you
test and report back? I'll update the entry with your findings.

bye,


Erik.

Re: request failed: 301 Moved Permanently

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 18, 2005, at 23:21, Erik Huelsmann wrote:

> http://subversion.tigris.org/faq.html#http-301-error

As an Apache administrator, I gotta say I'm pretty baffled by what's  
being said there:

> 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.

There are so many things wrong with this entry, I barely know where  
to begin. Apache "doesnt't know" what to do and will therefore  
"usually" do it this certain way? No, sorry; I don't buy that: Apache  
is not a random number generator. Apache will either always do it one  
way, or always another, but it won't switch between them on a whim.

To the rest of it, let's try to construct this example the FAQ entry  
seems to be talking about.

<VirtualHost *:80>
     ServerName example.com
     DocumentRoot /www
     <Location /www/foo>
         SVNPath /data/svn
         # etc.
     </Location>
     # etc.
</VirtualHost>

This virtual host definition should be absolutely valid. DocumentRoot  
refers to filesystem paths on the server's hard disk. Location refers  
to URL paths in web space. As the Apache manual goes to some pains to  
explain, web-space URLs need not have any correlation with filesystem  
paths. So the above virtual host definition would mean that the web  
site which is stored on the hard disk at /www is available under the  
URL http://example.com/ and that a repository which is on the hard  
disk at /data/svn is available under the URL http://example.com/www/ 
foo. It's unclear to me why anyone would want to hide a repository  
under the web-space URL path /www, but that's what the example said,  
so that's what we'll do.

I'm particularly unclear on what the FAQ entry is trying to say when  
it talks about a request coming in for /www/foo/bar and how Apache  
will be confused by this. Is it talking about the web-space URL  
http://example.com/www/foo/bar? If so, it should be handled without  
issue by the Location directive, and would mean "the directory /bar  
in the repository." Were the Location directive not there, it would  
map to the filesystem path /www/www/foo/bar. So no problem exists.  
Reading on in the paragraph, though, it seems it's actually talking  
about a request for http://example.com/foo/bar, which would translate  
to the filesystem path /www/foo/bar. This is not a problem at all;  
the web-space path /foo/bar does not match the Location directive / 
www/foo, so the files in the filesystem at /www/foo/bar are  
delivered, and again no problem exists.

I really don't see why the FAQ entry seems to think that DocumentRoot  
and Location are somehow related. What you specify in your  
DocumentRoot parameter should have no bearing on how you configure  
your Location tags. What am I missing? Or, more to the point, what is  
this FAQ entry missing? The FAQ entry was written, meaning someone  
had a problem at some point, but they certainly didn't have the  
problem the FAQ entry describes, since, as I've shown, no problem  
exists in that scenario.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: request failed: 301 Moved Permanently

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/16/05, Jerome Asselin <je...@crchum.qc.ca> wrote:
> Hello,
> 
> For the last two days, I've been trying to get started with
> subversion-1.1.1-2.1 on RHEL 4 AS. I run the following without any error
> until the last two svn commands.
> 
> su -
> cd /var/www/html
> mkdir svn
> cd svn
> svnadmin create repos
> chown -R apache:apache /var/www/html/svn
> 
> wget https://localhost/svn/repos -q -O - # Displays "Revision 0: ..."
> 
> $ svn checkout https://localhost/svn/repos wc
> svn: PROPFIND request failed on '/svn/repos'
> svn: PROPFIND of '/svn/repos': 301 Moved Permanently (https://localhost)
> $ svn mkdir https://localhost/svn/repos/branches
> svn: OPTIONS request failed on '/svn/repos'
> svn: OPTIONS of '/svn/repos': 301 Moved Permanently (https://localhost)
> svn: Your commit message was left in a temporary file:
> svn:    'svn-commit.tmp'
> 
> Has anybody seen this behavior before? What am I doing wrong?
> 
> My apache config includes this:
> 
> <Location /svn>
>   DAV svn
>   SVNParentPath /var/www/html/svn
>   <LimitExcept >
>    order allow,deny
>    allow from all
>   </LimitExcept>
> </Location>
> 
> Thanks for any help,

http://subversion.tigris.org/faq.html#http-301-error

HTH,


Erik.