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

Solved: Re: COPY and reverse-proxies

From: Konrad Rosenbaum <konrad_at_silmor.de>
Date: 2006-12-30 12:17:47 CET

On Friday 29 December 2006 20:44, Konrad Rosenbaum wrote:
> Now the problem is: if I try to commit a change that contains a copy
> operation I get "502 Bad Gateway" back from SVN.

[cut: Description of proxy environment]

> Or do I need to backport the new mod_headers?

Actually this was easier than expected:

1) get the current snapshot of Apache trunk from
http://cvs.apache.org/snapshots/httpd/ (I used snapshot
httpd_20061229171811.tar.gz); the diff between 2.0 and trunk is small
enough for this file to not be a problem.

2) install the correct development packages for the Apache that you are
running (Debian: apache2-prefork-dev) - if you have subversion installed on
a production server, it might be a good idea to install these packages on a
different machine

3) untar the snapshot; cd httpd/modules/metadata

4) apxs2 -c mod_headers.c

5) copy .libs/mod_headers.so to the Apache modules directory
(Debian: /usr/lib/apache2/modules) - preferably using a new name for it
(like mod_headers_too.so)

6) go into the configuration of your actual SVN-serving Apache (not the
proxy - mod_proxy accesses the data stream before mod_headers has a chance
to manipulate it) and add this line to add the module to Apache:
 LoadModule headers_module /usr/lib/apache2/modules/mod_headers_too.so
(of course you should correct the path to your installation and make sure
that the original mod_headers.so is not loaded)

7) in the same configuration, find the part where you configured SVN
(something like <Location /svn>...) and add:
RequestHeader edit Destination ^https http early

8) restart the SVN-Apache

Changing https to http in 7) should normally be enough. If not, either
change it to exchange "^https://myproxy.tld" for "http://myinternalsvnserv"
or add a "ServerAlias myproxy.tld" to the same config file/VHost.

        Konrad

  • application/pgp-signature attachment: stored
Received on Sat Dec 30 12:18:11 2006

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.