相关指令 sendfile 和sendfile_max_chunk
语法:
sendfile on | off;
用于开启或者关闭使用sendfile()传输文件,默认值为off,可以在http块、server块或者location块中进行配置
sendfile_max_chunk size;
size值如果大于0,Nginx进程的每个worker process每次调用sendfile()传输的数据量最大不能超过这个值
如果设置为0,则无限制,默认值为0
该指令可以在http块、server块或location块中配置
sendfile_max_chunk 128k;