1.ngx_http_stub_status_module is a built-in HTTP module of Nginx, which can provide Nginx status information. By default, this module is not compiled in, so you must specify to load this module when compiling Nginx--with-http_stub_status_module
2. First check if
nginx
is installed
ngx_http_stub_status_module
module
If it is not installed, you need to recompile.
# nginx -V | grep http_stub
#ngx_http_stub_status_module (static)
# nginx -v
##Tengine version: Tengine/2.1.1 (nginx/1.6. 2)
3, first in nginx
server
Information corresponding to segment configuration
server {
listen 80;
server_name xxx;
ngx_status Customized module name<strong></strong>
## {
## stub_status on ; Turn on status access
## Access_log off;
## #allow all; You can set which hosts need to be accessed
## #deny all;## }
}
4, reload
nginx,Access test
service nginx reload
curl 127.0.0.1:80/ngx_status
<strong></strong>
server accepts handled requests request_time
13711907 25715823 5175039843
Reading: 0 Writing: 12 Waiting: 123
##Description:
#//Number of active connections<strong></strong>
server accepts handled requests <strong></strong>
#13711907 25715823 5175039843
#Processed
connections and created 25715823
handshakes, a total of
5175039843ask.
##Reading: 0 Writing: 1 Waiting: 1
# Reading :
Read the client
<br>header
number,
Writing:Return the client<strong></strong>header
Number,
Waiting:
The request is completed, waiting for the next connection.
<br>
The above is the detailed content of ngix_http_stub_status_module. For more information, please follow other related articles on the PHP Chinese website!