nginx源码编译安装及配置文件说明
将配置文件的注释和空行去掉方便查看 # egrep -v "#|^$" nginx.conf.default > nginx.conf# cat nginx.conf
worker_processes1; ← worker 进程数量
events { ←事件区块
worker_connections1024; ←每个worker进程可以处理的连接数
}
http { ← HTTP 区块
include mime.types; ←支持的媒体文件
default_typeapplication/octet-stream; ←默认的媒体类型
sendfile on; ←高效传输模式
keepalive_timeout65; ←超时时间
server { ← server 区块
listen 80; ←监听的端口
server_namelocalhost; ←域名
location / { ←location区块
root html; ←站点目录
indexindex.html index.htm; ←首页文件
}
error_page 500 502 503 504/50x.html;← 错误信息配置
location = /50x.html {
root html;
}
}
}
页:
[1]