首页 > 其他 > 详细

NGINX 配置文件理解 之二

时间:2018-07-16 15:52:51      阅读:217      评论:0      收藏:0      [点我收藏+]
[root@localhost conf]# cat nginx.conf | grep -v ‘#‘ | grep -v ‘^$‘ worker_processes 1; #worker 进程的数量 events { #事件区块开始 worker_connections 1024; #每个worker进程支持的最大连接数 } #事件区块结束 http { #Http区块开始 include mime.types; #Nginx 支持的媒体类型库文件包含 default_type application/octet-stream; #默认的媒体类型 sendfile on; #开启高效传输模式 keepalive_timeout 65; #连接超时 server { #一个server 代表一个站点 listen 80; #提供服务的端口80 server_name localhost; #提供服务的域名主机名 location / { #程序根目录定位,如只需入域名或IP时,默认定位到‘/’下 root html; #nginx目录下的http文件夹,程序根目录 index index.html index.htm; #定义默认加载页页为index.html } #localtion模块结束 error_page 500 502 503 504 /50x.html; #定义转到错误页 location = /50x.html { root html; } } }

NGINX 配置文件理解 之二

原文:http://blog.51cto.com/12965094/2144497

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!