zoukankan      html  css  js  c++  java
  • nginx 做下载服务器

    参考配置

    events {   
     
     worker_connections 1;
     
     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; } } }
  • 相关阅读:
    概率统计(DP)
    iOS中几种定时器
    微信开发笔记——微信网页登录授权,获取用户信息
    swift中通知的使用
    Swift的基础,操作符,字符串和集合类型
    NSNotificationCenter
    IOS中通知中心(NSNotificationCenter)的使用总结
    Swift观察者模式
    swift中通知的使用
    Swift
  • 原文地址:https://www.cnblogs.com/jrsun/p/3986422.html
Copyright © 2011-2022 走看看