nginx常用配置项介绍
nginx -V 检测有没有编译模块--with-http_sub_module 这个模块,就代表可以启用status
location /nginx_status { stub_status on; access_log off; }
任意监听端口都能得到连接状态统计,http://127.0.0.1:8001/nginx_status
Active connections: 4 // 代表目前4个活动tcp连接 server accepts handled requests 12 12 72 //accepts 总共接收的12个tcp handled 总共处理了12个tcp连接 requests 总共处理了72个http请求 Reading: 0 Writing: 1 Waiting: 3 //代表正在读写的请求,3个准备好等待连接的tcp