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

redirect checkout requests from http to https

From: Red Tigra <redtigrareg_at_gmail.com>
Date: Thu, 4 Sep 2008 18:29:24 +0400

Hi all,

I'm almost sure that somebody already solved the question, so I dare to
ask.

Apache 2.2+SVN+websvn. All configs are inherited from the previous admin;
I'm a noob in svn world.

Goal: to redirect all "svn checkout" requests from http to https. In other
words, if user types "svn checkout http://toolssvn/svn/repo", it shoould be
replaced with "svn checkout https://toolssvn/svn/repo" and commit should be
successfully finished.

Quotation from my config is below:

...
redirectMatch ^/index\.html /websvn/index.php
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteLog "logs/rewrite.log"
RewriteLogLevel 3
...

<Location /svn>
  DAV svn
  SVNParentPath /svn
  <LimitExcept GET PROPFIND OPTIONS REPORT>
    Deny from All
  </LimitExcept>
</Location>

<Location /svn>
  DAV svn
  SVNParentPath /svn
  AuthName "Subversion Repository"
  AuthType Basic
# LDAP_Server sun-ds
# LDAP_Port 389
# Base_DN "ou=people,dc=sun,dc=com"
# UID_Attr uid

  LDAP_Server sun-ds-edge
  LDAP_Port 636
  Base_DN "ou=people,dc=sun,dc=com"
  UID_Attr employeenumber
  <LimitExcept GET PROPFIND OPTIONS REPORT>
     Require valid-user
     # Need to reverse the effect of the non-SSL config.
     Allow from all
  </LimitExcept>
</Location>

Browser requests are redirecting right. But checkout returns error:

root@toolssvn-test:/tmp $svn checkout http://localhost/svn/admin
svn: PROPFIND request failed on '/svn/admin'
svn: PROPFIND of '/svn/admin': 302 Found (http://localhost)

(svn checkout https://localhost/svn/admin is ok)

In rewrite.log I see:

127.0.0.1 - - [04/Sep/2008:07:17:22 --0700]
[localhost/sid#87b98][rid#2475c8/initial] (2) init rewrite engine with
requested uri /svn/admin
127.0.0.1 - - [04/Sep/2008:07:17:22 --0700]
[localhost/sid#87b98][rid#2475c8/initial] (3) applying pattern '(.*)' to uri
'/svn/admin'
127.0.0.1 - - [04/Sep/2008:07:17:22 --0700]
[localhost/sid#87b98][rid#2475c8/initial] (2) rewrite /svn/admin ->
https://localhost/svn/admin
127.0.0.1 - - [04/Sep/2008:07:17:22 --0700]
[localhost/sid#87b98][rid#2475c8/initial] (2) implicitly forcing redirect
(rc=302) with https://localhost/svn/admin
127.0.0.1 - - [04/Sep/2008:07:17:22 --0700]
[localhost/sid#87b98][rid#2475c8/initial] (1) escaping
https://localhost/svn/admin for redirect
127.0.0.1 - - [04/Sep/2008:07:17:22 --0700]
[localhost/sid#87b98][rid#2475c8/initial] (1) redirect to
https://localhost/svn/admin [REDIRECT/302]

I'd appreciate any help there.

Thanks,
Z.
Received on 2008-09-04 16:29:49 CEST

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.