1、编译时带上--with-http_stub_status_module模块
./configure --with-http_stub_status_module
2、nginx.conf增加配置
location /status
{
stub_status on;
}
3、在浏览器上输入http://ip/status查看nginx的状态
Active connections: 1 server accepts handled requests 57 57 57 Reading: 0 Writing: 1 Waiting: 0