`

使用nginx搭建文件下载服务器

 
阅读更多

nginx.conf配置如下:

 

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 on;

        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;

        }

    }

}

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics