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

  • Post author:
  • Post category:其他


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;

}

}

}



版权声明:本文为junmail原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。