How to Enable and Read NGINX Status Page

By: Sunil Kumar |  In: Server  |  Last Updated: 2019/02/12

How to Enable and Read NGINX Status Page

Nginx status page provides real-time data about the Nginx server health. This data can be used to optimize the Nginx server for performance.


Before proceeding make sure that your Nginx server is compiled with the ngx_http_stub_status_module .  To check whether the Nginx is compiled with the module or not, run the following command on your terminal-

nginx -V 2>&1 | grep -o with-http_stub_status_module

If you see the following output, you are good to proceed.
Nginx Configuration
Now you can enable the status page on http://localhost or on a specific domain. Let say you want to enable on the domain –
To do this open the block file for this domain and add the following code inside the server block

location /nginx_status {
               stub_status on;
               access_log off;
               deny all;

Here we allowed this page for local server IP. Do not forget to change the IP if you are enabling this for the production server.
After making the changes check the Nginx config syntax and reload the Nginx server

sudo nginx -t
sudo service nginx reload

Accessing the Status Page

Once you have enabled the status page you can check it by going to the URL
It will output like this

Reading the Nginx Status Page

-Active connections
Total no of connection opened on your server. It does not reflect the no. of the current user on the website. Maybe there are multiple connections are opened for a single user.
This is the Total no of connection established on that time.
Shows the total no of handled connections by the Nginx server. Usually, this no is the same as the First one.
Shows the total no of request handled by the Nginx server. It is usually greater than the first two numbers.
The current number of connections where Nginx is reading the request header.
The current number of connections where Nginx is writing the response back to the client.
The current number of idle client connections waiting for a request.


Now you will be able to enable status page for your server as well as understanding the status result.


Leave a Comment

Your email address will not be published.


Sunil Kumar

I am the owner of acmeextension. I am a passionate writter and reader. I like writting technical stuff and simplifying complex stuff.
Know More

Join more than 10,000 others Web Developers