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

Re: SLES 10 SVN using Apache

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-05-05 03:06:37 CEST

On May 4, 2007, at 10:29, Brent Kiley wrote:

>> > The problem
>> > is I can not connect to the repositories using the svn client or
>> the
>> > TortoiseSVN. I believe that the problem is that both these clients
>> > seem to ignore the trailing slash and get a 302 code returned
>> and do
>> > not handle the 302 code correctly. I can get this to work correctly
>> > using SmartSVN.
>>
>> I think I have encountered this before. Does your Apache
>> configuration file include something like this after the close of
>> the "<Location /svn/>" section? (assuming that "svn" is the
>> virtual directory you want to serve up Subversion from)
>>
>> # This will redirect "/svn" to "/svn/"
>> # http://www.nabble.com/SVNListParentPath-t839339.html
>> RedirectMatch ^(/svn)$ $1/
>
> I tried doing what you suggested but it did not help, I still get a
> 302. I will post my config for this vhost so that you can see it.
> The thing is even if this would have worked, it would only have
> worked for the parent path and nothing under. So if I typed in the
> path for an actual repository I would still have the trailing slash
> problem. I am not sure if I mentioned that it does not work if I
> type in the full repository path as well. The rewrite rule that is
> in the directory section is something that I saw on another site as
> a suggestion, it does not seem to help.

FYI: Subversion will not follow any redirects, such as 302s or 301s.

> <VirtualHost 192.168.1.15>
> DocumentRoot /devel
> ServerName repo.mansef
> ServerAdmin bkiley_at_gmail_dot_com
> # YaST created entry
> <Directory "/devel">
> Options None
> AllowOverride None
> Order allow,deny
> Allow from all
> DirectoryIndex index.php index.html
> Options +FollowSymLinks
> RewriteEngine on
> RewriteBase /repo/
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^(.+[^/])$ /$1/ [R]
> </Directory>

What are these rewrite directives? I'd take them out until everything
else is working, then put them back in if they do something useful
for you.

> <IfModule mod_dav_svn.c>
> <Location /repo>
> RedirectMatch ^(/repo)$ $1/

I think Subversion will not follow such redirects.

> DAV svn
> SVNListParentPath on
> SVNParentPath /devel/repo
> <LimitExcept GET PROPFIND OPTIONS REPORT>
> Order deny,allow
> Allow from all
> </LimitExcept>
> </Location>
> </IfModule>
> </VirtualHost>

A-ha! Your repositories (/devel/repo/*) are inside your DocumentRoot
(/devel). Don't do that. Put your repositories anywhere else on your
server's disk. They do not belong in the document root. See the FAQ:

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

There are some inaccuracies in the FAQ and it's worded a bit
confusingly but the point remains.

Did your OS distribution suggest this layout to you -- with the
repositories inside the DocumentRoot?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat May 5 03:08:43 2007

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.