Subversion behind nginx...

Dave Cheney dave at cheney.net
Thu Sep 11 03:56:41 MSD 2008


Hi Sonny,

Can you post more of your config, it might be possible that the server {}
block around this config is causing you to hand off to yourself, that is

server {
   listen 80;
   server_name foo;

   location {
      proxy_pass http://127.0.0.1:90;
   }
}

Listen 80 will bind to all interfaces, including the localhost, so in this
config proxy_pass is handing off to itself, in an infinite loop.

Also, what are you using for you svn server, apache + mod_svn?

Cheers

Dave

On Thu, 11 Sep 2008 01:03:36 +0200, Sonny Chee <lists at ruby-forum.com>
wrote:
> Hey Guys,
> 
> Anyone have success configuring access to a subversion repository behind
> nginx?  I thought the following snippet would forward subversion calls
> to the svn server... but I keep getting "...502 Bad Gateway.."  Any
> hints would be greatly appreciated.
> 
>     location /svn {
>             proxy_pass      http://127.0.0.1:80;
>             include         /etc/nginx/proxy.conf;
>             set  $dest  $http_destination;
>             if ($http_destination ~ "^https://(.+)") {
>                set  $dest   http://$1;
>             }
>             proxy_set_header  Destination   $dest;
>     }
> 
> 
> Sonny.
>





More information about the nginx mailing list