Nginx Status Page configuration method and Chinese description _nginx

Source: Internet
Author: User

Nginx and PHP-FPM have built a status page that is very helpful to understand the status of Nginx and to monitor Nginx. For subsequent monitoring, we need to first understand the Nginx status page.

1. Enable Nginx status configuration

Add location to the default host or the host you wish to access.

Copy Code code as follows:

server {
Listen *:80 default_server;
server_name _;
Location/ngx_status
{
Stub_status on;
Access_log off;

#allow 127.0.0.1;

#deny all;
}
}

2. Restart Nginx

Please restart your nginx in accordance with your circumstances.

Copy Code code as follows:

# Service Nginx Restart

3. Open Status Page

Copy Code code as follows:

# Curl Http://127.0.0.1/ngx_status
Active connections:11921
Server accepts handled requests
11989 11989 11991
reading:0 Writing:7 waiting:42

4. Nginx Status Detailed

Copy Code code as follows:

Active connections– number of actively connected connections
The server accepts handled requests-has handled 11,989 connections, successfully created 11,989 handshakes, and handled 11,991 requests in a total
Reading-reads the number of connections to the client.
Number of writing-response data to client
waiting-Open keep-alive, this value equals active– (reading+writing), meaning that Nginx has finished processing the resident connection waiting for the next request instruction.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.