首页 > 代码库 > nginx 做下载服务器
nginx 做下载服务器
参考配置
events { worker_connections 65535; use epoll; } http { log_format f_nginx "$remote_addr`$server_addr`$server_protocol`$request_method`$server_port`$bytes_sent`$uri`?$query_string`$status`$request_time`[$time_local]`$http_referer`$http_user_agent"; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 60; types_hash_max_size 2048; server_names_hash_bucket_size 128; client_header_buffer_size 4; client_header_timeout 60; client_body_timeout 60; large_client_header_buffers 16 512k; #client_body_buffer_size 256k; client_max_body_size 10m; include /etc/nginx/mime.types; default_type application/octet-stream; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; gzip on; gzip_min_length 1024; gzip_buffers 16 32k; gzip_proxied any; gzip_types text/plain application/x-javascript text/css application/xml text/javascript; limit_zone ltone $binary_remote_addr 10m; server { listen 80; server_name test.com; access_log /test/access.log; error_log /test/error.log; root /test; index index.htm; limit_conn 10; limit_rate 50k;
#是否支持读取目录 autoindex on; sendfile on; tcp_nopush on; expires 365d; location ^~/testdown/ { root /test; limit_rate 800k; autoindex on; sendfile on; tcp_nopush on; rewrite ^(.*)$ /test.gz break; } } }
nginx 做下载服务器
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。