Use nginx to build a file download server

The nginx.conf configuration is as follows:

 

user  root;

worker_processes  8;

 

events {

    worker_connections  1024;

}

 

http {

    include       mime.types;

    default_type  application/octet-stream;

    sendfile        on;

    tcp_nopush      on;

    keepalive_timeout  65;

 

        server {

        listen       8009;

        server_name  localhost;

        autoindex is;

        autoindex_exact_size off;

        autoindex_localtime on;

        location / {

            root   /usr/local/nginx/fileserver;

            index  index.html index.htm;

        }

 

        error_page   500 502 503 504  /50x.html;

        location = /50x.html {

            root   html;

        }

    }

}

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326921115&siteId=291194637