server { listen 8080; ## listen for ipv4; this line is default and implied server_name $domain_name; root /var/www; index index.html index.htm index.php; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log;
# download path, using harddisk base on samba dir=/media/pi/ITABAS/download
# enable disk cache, 0 is disable,default is 16M(aria2 version>=1.16) # 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M disk-cache=32M # enable continue process when process crash # 断点续传 continue=true
# File pre allocation method can effectively reduce disk fragmentation, # recommend value prealloc # If external disk system is NTFS recommend use falloc # 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc # 预分配所需时间: none < falloc ? trunc < prealloc # falloc和trunc则需要文件系统和内核支持 # NTFS建议使用falloc, EXT3/4建议trunc, MAC 下需要注释此项 file-allocation=falloc
## download connection ##
# max concurrent download connections(runtime can be modified), default is 5 # 最大同时下载任务数, 运行时可修改, 默认:5 max-concurrent-downloads=5
# max concurrent connections per server(runtime can be modified), default is 1 # 同一服务器连接数, 添加时可指定, 默认:1 max-connection-per-server=15
# download speed limit(runtime can be modified), default is 0(unlimited) # 整体下载速度限制, 运行时可修改, 默认:0(不限制) max-overall-download-limit=0