SubversionProblem: Reverse Proxying to Apache with mod_dav_svn

glathe.helko@googlemail.com nginx-forum at nginx.us
Mon Sep 14 10:24:22 MSD 2009


Hi everyone.

I have NGINGX installed in front of an Apache with mod_dav_svn to access my Subversion Repositories via WebBrowser and with SVN-Clients.

Adding and committing small files is working well.

But when I try to add/commit  a large file (files with ca more than 100 or 200 KiloByte) I get an error.

The NGINGX-ErrorLog says:
2009/09/14 01:02:06  3596#0: signal process started
2009/09/14 01:02:30  3597#0: *75 sendfile() failed (38:
Function not implemented) while sending request to upstream, client:
85.178.219.182, server: svn.my.synology-diskstation.de, request:
"PUT /repos/Paper-2009-SEISCONF/!svn/wrk/cb91b057-5bb4-084b-bd76-57f91625eb1e/Einfuehrung_Richtlinien%20%5BSchreibgesch%C3%BCtzt%5D.pdf
HTTP/1.1", upstream:
"http://127.0.0.1:2080/repos/Paper-2009-SEISCONF/!svn/wrk/cb91b057-5bb4-084b-bd76-57f91625eb1e/Einfuehrung_Richtlinien%20.pdf",
host: "svn.my.synology-diskstation.de"

The error messages of the Tortoise SVN Client:
Error: Commit failed (details follow):  
Error: PUT of '/repos/Paper-2009-SEISCONF/!svn/wrk/cf98065e-f6ff-bd45-be26-ba027b7b69bc/Einfuehrung_Richtlinien%20%5BSchreibgesch%C3%BCtzt%5D.pdf': 502 Bad Gateway (https://svn.my.synology-diskstation.de) 

The nginx.conf part for svn:
server {
        listen 7080;
        server_name svn.my.synology-diskstation.de;
        rewrite ^(.*) https://svn.my.synology-diskstation.de$1 redirect;
    }

    # HTTPS server
    #
    server {
       listen       7443;
       server_name svn.my.synology-diskstation.de;

       ssl                  on;
      ssl_certificate      /opt/etc/apache2/ssl-cert/subversion.crt;
      ssl_certificate_key  /opt/etc/apache2/ssl-cert/subversion.key;

      ssl_session_timeout  5m;

     ssl_protocols  SSLv2 SSLv3 TLSv1;
      ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
      ssl_prefer_server_ciphers   on;
      add_header Front-End-Https on;

        location /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://127.0.0.1:2080/repos/;
}

Also in th http{} section of nginx.conf the following is set:

    include       mime.types;
    default_type  application/octet-stream;
    server_names_hash_bucket_size 33;
    log_format main '$http_x_forwarded_for';
    #log_format  main  '$request_uri - $server_addr - $server_port - $remote_addr - $remote_port - $remote_user [$time_local] "$request" '
#                      '$status $body_bytes_sent "$http_referer" '
 #                     '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /opt/etc/nginx/logs/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    client_max_body_size 65M;
    client_body_buffer_size 128K;
    #gzip  on;


Has anyone an idea whats wrong?
Only files with size smaller than 100 KiloBytes can be added/committed to the SVN Repository.

Thanks in advance, Helko

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,6789,6789#msg-6789






More information about the nginx mailing list