1

I have raspberry pi with nginx as reverse proxy and another machine with owncloud on nginx too.

I can connect and browse in the pages but when I try to download a file that weight more than about 50mo, the download start a bit and fails.

I know the problem come from the reverse proxy, because if I access owncloud directly (locally), downloads work.

owncloud vhost :

server {
    listen 80;
    server_name cloud.spooky4672.me;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    server_name cloud.spooky4672.me;

    #SSL
    ssl_certificate /etc/nginx/ssl/cloud/cloud.spooky4672_chain.pem;
    ssl_certificate_key /etc/nginx/ssl/cloud/key.pem;

    #LOGS
    access_log off;
    error_log /var/log/nginx/owncloud-error.log;

    location / {
            proxy_pass http://local_ip;
    }
}

proxy.conf

    proxy_redirect          off;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size    10m;
    client_body_buffer_size 128k;
    client_header_buffer_size 64k;
    proxy_connect_timeout   90;
    proxy_send_timeout      90;
    proxy_read_timeout      90;
    proxy_buffer_size   16k;
    proxy_buffers       32   16k;
    proxy_busy_buffers_size 64k;
8
  • Maybe try some real hardware instead of the RasPi. Commented Nov 6, 2015 at 20:28
  • So we really can find troll everywhere :) Commented Nov 6, 2015 at 20:29
  • Not trolling. You asked your question on a site for professional systems administrators, so expect to get professional-level advice. If I were in your shoes, removing the RasPi would be the first thing I'd try. Commented Nov 6, 2015 at 20:31
  • This is just a setup for me and friends, and the pi is clearly not the problem Commented Nov 6, 2015 at 20:32
  • Well, you haven't provided any evidence to show that. Commented Nov 6, 2015 at 20:33

1 Answer 1

1

Answered on StackOverflow

https://stackoverflow.com/questions/17932569/can-not-upload-big-files-with-nginx-reverse-proxyssl-negotiation-and-tomcat

client_max_body_size 1000m;

Also check out http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_max_temp_file_size

and try proxy_max_temp_file_size 0

2
  • It works, but the download stay a very long time at 0ko/s, weird ... Commented Nov 6, 2015 at 21:08
  • 1
    Thanks! It was proxy_max_temp_file_size that worked for me to fix freezing large downloads. Commented Jan 8, 2018 at 20:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.