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

Re: Trouble configuring Apache with SVN

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-07-21 09:33:19 CEST

On Jul 20, 2007, at 15:32, Rainer Sokoll wrote:

> On Fri, Jul 20, 2007 at 01:19:58PM -0700, J Kramer wrote:
>> Recently a Trojan took down our server, so I have had to
>> reinstall SVN (we
>> have backups of our repository data, so no worries there).
>> I successfully installed SVN with no problem. I've also
>> installed Apache 2
>> and configured SSL for the secure portion of our website.
>> But I have not been able to configure SVN to work properly.
>> I have added the following lines to my httpd.conf:
>> <Location /svn>
>> DAV svn
>> SVNListParentPath on
>> SVNParentPath E:\SVN
>> AuthType Basic
>> AuthName "Subversion repositories"
>> AuthUserFile "C:\Program Files\Apache Group\Apache2\passwd\passwd"
>> Require valid-user
>> </Location>
>> C:\Program Files\Apache Group\Apache2\passwd\passwd is the same
>> file used
>> for authentication for the secure portion of the website. I can
>> get into
>> the secure portion of the website, but when I enter the user name
>> and
>> password when trying to relocate my local repository, it is
>> rejected. Can
>> anyone explain why this is happening?
> I vaguely remeber that on Windoze you have to use double
> backslashes as
> path separators.

I believe forward slashes are the preferred path separator for Apache
config files, even on Windows.

>> Also, is there a way that I can force SVN to accept only secure
>> connections. Right now, it seems to accept both http and https
>> connections.
> Either mod_rewrite or Redirect or RedirectMatch.

Well, in a way.

What you have now, John, is that you have a virtual host doing http
on 80 and a virtual host doing https on 443 and they're both serving
the repository. If you only want secure connections, "simply" remove
the section of the config that's creating the http vhost on 80, or if
you still want to serve other things on 80, just not the repository,
remove the section that's serving the repository. Possibly, you only
have one config file in which you specify the repository details, but
it's being included from two different places -- an http vhost and an
https vhost. If so, find those two places, and remove the include
from whichever one is the unencrypted http vhost.

mod_rewrite, Redirect or RedirectMatch can then be used in the http
vhost to redirect any traffic to the https vhost. This will be useful
for people visiting the repository via a web browser. It will not be
useful to anyone attempting to access the repository via a Subversion
client, as Subversion clients to not support redirects. It will not
be useful to anyone who already has a working copy via http. I don't
think there's any way to avoid them getting a bizarre error when they
try to update such a working copy after you have turned off said

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jul 21 09:32:47 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.