Home > Article > Backend Development > nginx status nginx status configuration nginx status module nginx nginxstatu
nginx has a built-in status page like php-fpm, which is very helpful for understanding the status of nginx and monitoring nginx. For subsequent zabbix monitoring, we need to first understand what the nginx status page is.
1. Enable nginx status configuration
Add location to the default host or the host you want to access.
1 234567891011 |
server{ listen *:80default_server; server_name_; location /ngx_status { stub_status on; all; } }
2. Restart nginx Please restart your nginx according to your environment |
1
# service nginx restart
3. Open the status page
|
1
2
4
# curl http://127.0.0.1/ngx_status Active connections : |
11921
server accepts handled requests11989 1198911991Reading: 0Writing: 7 Waiting:42 4. Detailed explanation of nginx status active connections – the number of active connections server accepts handled requests – a total of 11989 connections were processed, 11989 handshakes were successfully created, and a total of 11991 requests were processed reading – reading customers The number of connections to the client. | writing - the number of response data to the client
from https://www.ttlsa.com/nginx/nginx-status-detail/
The above has introduced nginx status, including status and nginx content. I hope it will be helpful to friends who are interested in PHP tutorials.