nginx学习记录

1. 使用监控页面

安装:

安装时添加--with-http_stub_status_module配置,命令如下:

./configure --prefix=<your_path> --with-http_stub_status_module
make
make install

 

配置:

conf/nginx.conf添加:

location /nginx_status {
stub_status on;
access_log off;
#allow x.x.x.x
#deny all;
}

 

效果 

浏览器访问:http://x.x.x.x/nginx_status,效果如下:

Active connections: 1
server accepts handled requests request_time
2621 2621 2621 321347
Reading: 0 Writing: 1 Waiting: 0