You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brent Kiley <bk...@gmail.com> on 2007/05/04 15:09:22 UTC

SLES 10 SVN using Apache

Hello all,

I am hoping that someone might have some insight to my problem. Currently I
am trying to get subversion to run on SLES 10 under apache 2.2. I am using
the package that is available for SLES and therefore the version of
subversion is 1.3.1.

I have created about 20 repositories in one location on my machine. I then
configured apache to use the SVNParentPath so that I can have access to all
of the repositories. Access to the repositories works fine in apache.
Currently they are all empty but going to them will give Revision 0: / and
going to the parent path will give a list of the repositories, since that is
how I have configured it. 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 believe that this might have been corrected in a later release of SVN but
my issue is that this is the package that is available for SLES 10 at this
time.

Does anyone know if any work around for this?

Thanks for any help you can provide.

Brent

Re: SLES 10 SVN using Apache

Posted by Brent Kiley <bk...@gmail.com>.
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 <su...@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?
>
>
>

Re: SLES 10 SVN using Apache

Posted by Ryan Schmidt <su...@ryandesign.com>.
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

Re: SLES 10 SVN using Apache

Posted by Brent Kiley <bk...@gmail.com>.
Hi Olivier,

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.

Brent

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

 <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, Olivier Dagenais <ol...@formark.com> 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/
>
>
> HTH,
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Olivier Dagenais
> Software Engineering / Génie logiciel
> Formark - Combine the Best of SharePoint(r) and Livelink(r)
> Phone: 613-599-5173 ext 238
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Make sure you don't miss anything: subscribe to the Formark Newsletter:
> http://www.formark.com/support/register/index.asp
>
>
>
>
>

RE: SLES 10 SVN using Apache

Posted by Olivier Dagenais <ol...@formark.com>.
> 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/


HTH,

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Olivier Dagenais
Software Engineering / Génie logiciel
Formark - Combine the Best of SharePoint® and Livelink®
Phone: 613-599-5173 ext 238
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Make sure you don't miss anything: subscribe to the Formark Newsletter:
http://www.formark.com/support/register/index.asp