Subversion behind nginx

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 {
        include         /etc/nginx/proxy.conf;
        set  $dest  $http_destination;
        if ($http_destination ~ "^https://(.+)") {
           set  $dest   http://$1;
        proxy_set_header  Destination   $dest;


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 {

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

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



On Thu, 11 Sep 2008 01:03:36 +0200, Sonny C. [email protected]