# SubversionProblem: Reverse Proxying to Apache with mod\_dav\_svn

**URL:** <https://www.ruby-forum.com/t/subversionproblem-reverse-proxying-to-apache-with-mod-dav-svn/175456>\
**Category:** NGINX\
**Created:** [September 14, 2009, 8:34am UTC](https://www.ruby-forum.com/t/subversionproblem-reverse-proxying-to-apache-with-mod-dav-svn/175456 "2009-09-14T08:34:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 14, 2009, 8:34am UTC](https://www.ruby-forum.com/t/subversionproblem-reverse-proxying-to-apache-with-mod-dav-svn/175456/1 "2009-09-14T08:34:29Z")

</div>

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](http://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](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](http://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](https://svn.my.synology-diskstation.de))

The nginx.conf part for svn:  
server {  
listen 7080;  
server\_name [svn.my.synology-diskstation.de](http://svn.my.synology-diskstation.de);  
rewrite ^(.\*) [https://svn.my.synology-diskstation.de$1](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:

> **[SubversionProblem: Reverse Proxying to Apache with mod\_dav\_svn](https://forum.nginx.org/read.php?2,6789,6789#msg-6789)**
>
> Hi everyone. I have NGINX 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...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 14, 2009, 10:22am UTC](https://www.ruby-forum.com/t/subversionproblem-reverse-proxying-to-apache-with-mod-dav-svn/175456/2 "2009-09-14T10:22:13Z")

</div>

Hello!

On Mon, Sep 14, 2009 at 02:24:22AM -0400, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 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](http://svn.my.synology-diskstation.de), request:

Looks like either your OS or filesystem you are using for  
client\_temp\_path has no sendfile() support. Switching off  
sendfile should fix this.

Maxim D.
