C
C
chief2020-04-30 21:49:41
Nginx
chief, 2020-04-30 21:49:41

Why is nginx bad at serving large downloads?

Hello.
Guys, help me understand. There is a home web server with files running on Nginx\php (stupid folder overview). The world is proxied through nginx on the router. The problem is that if you go to your network (by IP: 80), then everything is ok. You can even watch movies. But from the outside - I see files, I even download small ones, but if the file is large, then the speed is 10-100Kbps in jerks and then disconnect. I feel that the problem is somewhere in the parameters. Tell me what am I doing wrong?

a piece of nginx.conf of the router:

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    #gzip  on;

    server {
        listen  80;
        server_name torrent.chifty.top;

        location / {
                proxy_pass      http://192.168.222.10:8080;
        }
    }


piece of nginx.conf server:
http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    sendfile_max_chunk 512k;
    tcp_nopush     on;
    tcp_nodelay on;
    directio 10m;
    expires max;
    limit_rate 5M;
    keepalive_timeout  65;

    server {
        listen          8080;
        server_name     torrent.chifty.top;
        root /usr/local/www/chifty/torrent;
        index  /_h5ai/public/index.php;

        location / {
            try_files $uri $uri/ =404;
        }

        error_page      500 502 503 504  /50x.html;
        location = /50x.html {
        root /usr/local/www/nginx-dist;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                include fastcgi_params;
        }
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2020-04-30
@KingstonKMS

Проблема явно в маршрутизаторе

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question