[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: Brent Kiley <bkiley_at_gmail.com>
Date: 2007-05-07 17:20:33 CEST

Hello Ryan,

Sorry it took me so long to get back to you, I was away over the weekend.

I put them in the document root because the tutorial I was reading online
did it like that I believe, I can't remember where this tutorial was though.
Also the reason for the rewrite rules was another attempt at correcting the
/ problem, I have commented them out for now. I tried what you suggested and
I still can not seem to get it to work correctly. I moved the repo out of
the document root and rewrote the config to accomidate this yet it still
will not work using the svn client and it gives a 301 error. I tried
uncommenting the RedirectMatch ^(/repo)$ $1/ that was suggested by Olivier
and in that case it gives a 302 error instead.

Do you have any suggestions in order for me to get this to work? I would
greatly appriciate it. I will paste my config as it is now below so that you
can have a look.

Brent

<VirtualHost 192.168.1.15>
 DocumentRoot /devel/web
 ServerName repo.mansef
 ServerAdmin bkiley@gmail.com
# YaST created entry
 <Directory "/devel/web">
  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>

 <IfModule mod_dav_svn.c>
  <Location /repo>
   #RedirectMatch ^(/repo)$ $1/
   DAV svn
   SVNListParentPath on
   SVNParentPath /devel/repo
   <LimitExcept GET PROPFIND OPTIONS REPORT>
   Order deny,allow
   Allow from all
   </LimitExcept>
  </Location>
 </IfModule>
</VirtualHost>

On 5/4/07, Ryan Schmidt <subversion-2007b@ryandesign.com> wrote:
>
> 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?
>
>
>
Received on Mon May 7 17:20:56 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.