3 messages in ru.sysoev.nginxRe: NGINX + Subversion + HTTPS and 50...
FromSent OnAttachments
Mario GazzoDec 15, 2008 6:29 am 
Gena MakhomedDec 15, 2008 8:57 am 
Mario GazzoDec 15, 2008 12:20 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: NGINX + Subversion + HTTPS and 502 Bad Gateway errorActions...
From:Mario Gazzo (mari@gmail.com)
Date:Dec 15, 2008 12:20:59 pm
List:ru.sysoev.nginx

Hi Gena,

This worked like a charm. Thanks a lot for the quick reply.

Big Ups :))

Mario

On 15/12/2008, at 17.57, Gena Makhomed wrote:

On Monday, December 15, 2008 at 16:30:12, Mario Gazzo wrote:

MG> "svn: Server sent unexpected return value (502 Bad Gateway) in MG> response to COPY request"

MG> After googling around there was some indications that this could MG> be related to running subversion over https behind a reverse proxy MG> although I must admit that I am not entirely sure about this.

because nginx pass to backend https:// url in Destination header.

but http:// and https:// urls can not be mixed in COPY request.

workaround available:

server_name www.mydomain.com;

location /myproj/repos {

set $fixed_destination $http_destination; if ( $http_destination ~* ^https(.*)$ ) { set $fixed_destination http$1; }

proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Destination $fixed_destination; proxy_pass http://subversion_hosts; }

MG> server_name www.mydomain.com; MG> location /myproj/repos { MG> proxy_pass http://subversion_hosts; MG> }