Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install SVN server and use it with my NGINX webserver. i have tried this
in server section in nginx/sites-enabled/svn i have added this

  location /var/svn/repos {
        #include         /etc/nginx/proxy.conf;
        set  $dest  $http_destination;
        if ($http_destination ~ "^https://(.+)") {
           set  $dest   http://$1;
       proxy_set_header  Destination   $dest;

and i am running apache on port 81 and have made the virtual host that were running 100% on apache. now whenever i try to svn checkout, i get this:

$ svn co
svn: Server sent unexpected return value (500 Internal Server Error) in response to OPTIONS request for ''

and in error log i have this

2012/04/18 07:43:36 [error] 9914#0: *106 rewrite or internal redirection cycle while internal redirect to "/index.html", client:, server:, request: "GET /myrepo HTTP/1.1", host: ""

Do anybody know how to install svn server on nginx? any idea is highly appreciated?
Thanks for your help

share|improve this question
Can you provide the rest of your configuration? The block you've pasted doesn't correspond to the logs that show the error. – Shane Madden Apr 19 '12 at 2:50
up vote 4 down vote accepted

I have had success with something like this. You might be able to simplify it even more, but it might provide you with a working configuration.

In nginx.conf (or other .conf-file under /etc/nginx/conf.d):

location /var/svn/repos {
    # the "proxy_set_header Destination"-stuff is moved to apache's config - see below

Then in /etc/httpd/conf.d/subversion.conf

<VirtualHost *:81>
    RequestHeader edit Destination ^https http early

    <Location /var/svn/repos>
        DAV svn
        SVNPath /var/svn/repos
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.