HTTP模块控制着nginx http处理的所有核心特性 以下为常用配置:
http{
include mime.types;
default_type application/octet-stream;
client_header_buffer_size 4k;
large_client_header_buffers 8 128k;
client_body_buffer_size 512k;
client_max_body_size 300m;
gzip on;
sendfile on;
#tcp_nopush on;
}
注: keepalive_timeout open_file_cache也可以配置在http模块 与配置在event模块相同 详见http://blog.csdn.net/zhangsheng_1992/article/details/51689980
log_format日志配置 负载均衡 反向代理等配置此处省略介绍 我将在介绍相应的模块时详细介绍 故此出省区部分配置
include mime.types;
default_type application/octet-stream;
#设定mime类型,类型由mime.type文件定义 该文件内定义指定文件头所对应的文件格式 下面为截取的部分文