Welcome! Log In Create A New Profile

Advanced

Re: proxying to apache/svn, COPY fails, but without HTTPS

August 12, 2009 06:30AM
On Wed, Aug 12, 2009 at 12:18:23PM +0200, Samuel Vogel wrote:

> Am 10.08.09 16:50, schrieb Samuel Vogel:
> >Hey guys,
> >
> >We proxy http://svn.domain.com:80 to http://localhost:81, where an
> >apache server with mod_dav_svn is listening, which is binding only to
> >127.0.0.1:81.
> >We do get a "502 Bad Gateway" for COPY requests. This topic came up a
> >couple of times on the list, but issues with HTTPS vs. HTTP always
> >caused the problems.
> >This is however not the case with out setup, the SVN client uses HTTP
> >and we proxy to the backend via HTTP.
> >
> >Our nginx config:
> >server {
> > listen 80;
> > server_name svn.domain.com;
> >
> > location / {
> > proxy_pass http://localhost:81;
> > }
> >}
> >
> >Apache config:
> >Listen 127.0.0.1:81
> >
> > ServerName svn.domain.com
> > UseCanonicalName On
> >
> ><Location />
> > DAV svn
> > SVNParentPath "/var/lib/svn"
> ></Location>
> >
> >Any hints how this could be solved?
> >
> >Regards,
> >Samy
> I have now changed my nginx config as follows:
>
> server {
> listen 80;
> server_name svn.domain.com;
>
> location / {
> set $dest $http_destination;
> if ($http_destination ~ "^http://svn.domain.com/(.+)") {
> set $dest http://localhost:81/$1;
> }
>
> proxy_set_header Destination $dest;
>
> proxy_pass http://localhost:81;
> }
> }
>
> Now the COPY Request looks as follows (captured with tcpdump):
> COPY /tourvital/!svn/bc/120/trunk HTTP/1.0
> Destination:
> http://localhost:81/tourvital/!svn/wrk/0200ab05-2301-0010-93d2-4be8b1bacda6/branches/test
> Host: localhost:81
>
> Shouldn't this be working?

This should work.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

proxying to apache/svn, COPY fails, but without HTTPS

Samuel Vogel August 10, 2009 10:50AM

Re: proxying to apache/svn, COPY fails, but without HTTPS

Samuel Vogel August 12, 2009 06:18AM

Re: proxying to apache/svn, COPY fails, but without HTTPS

Igor Sysoev August 12, 2009 06:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready