##Synopsis## 这个模块主要用来获取nginx当前执行状况,而且默认是未被编译进nginx中的。
--with-http_stub_status_module

Example:

location /nginx_status {
  stub_status on;
  access_log   off;
  allow SOME.IP.ADD.RESS;
  deny all;
}
[root@localhost sbin]# curl http://localhost/nginx_status
Active connections: 1 
server accepts handled requests
 9 9 9 
Reading: 0 Writing: 1 Waiting: 0 

##Source Code## 代码在ngx_http_sub_status_module.c 如果没有变量,这简直就是个hello world。如果看不懂,Nginx模块开发入门。 关于变量部分另外再说吧。



Published

18 August 2013

Category

NGINX源码分析

Tags