http {2、配置nginx_http文件:
limit_conn_zone $binary_remote_addr zone=addr:10m;
}
server {
listen 80;
server_name localhost;
location / {
root /data/wwwroot;
index index.html index.htm;
try_files $uri $uri/ /index.html;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
limit_conn addr 1; # 每个客户端只允许一个线程
limit_rate 1024k; # 每个线程最大下载速度1M
}
}
网友回复