HowTo: Enable Nginx Status Page

Apache has status page that can provide data about Apache. How do I enable and display such page using nginx server? How do I enable nginx status page on Linux or Unix-like operating systems?

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements HttpStubStatusModule
Est. reading time 5m
Like Aapache (httpd), nginx has status page to give you information about Nginx’s server health including Active connections and other data. You can use this info to fine tune your server. Please note that you will get stats for entire Nginx server running. This can not be used to get info per virtual host i.e. you will get data for entire Nginx server only.

Make sure HttpStubStatusModule compiled

Type the following command to verify that HttpStubStatusModule is compiled and available to you:
nginx -V | grep --color -o http_stub_status

Enable Nginx status page on Linux/Unix

Edit nginx.conf, enter:
# vi nginx.conf
Update your server { ..... } block/context as follows (see how to deny access to IP address on nginx):

   location /nginx_status {
        # Turn on nginx stats
        stub_status on;

        # I do not need logs for stats
        access_log   off;

        # Security: Only allow access from IP #
        # Send rest of the world to /dev/null #
        deny all;

Feel free to replace with your actual IP address. This is a security feature as you do not want to show your status to the whole world.

Restart / reload nginx server

Type the following command to reload nginx:
# service nginx reload
# nginx -s reload

How do I view nginx status page?

Fire a browser and type the url:

Sample outputs:

Gif 01: Nginx status page in action (note I am refreshing screen to show you demo)

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 6 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
6 comments… add one
  • Ardy Apr 6, 2014 @ 11:38

    First, I wanna ask about “server load time”. Can you tell me how to configure it on nginx?
    Thanks b4

    • jesus Aug 6, 2014 @ 20:52

      What do you mean with “server load time”? That is going to depend on a lot of things, mainly your application, database access, etc.

      If you want to test the load time of your site you could use site like

      • Ardy Aug 18, 2014 @ 4:46

        I mean how to see our server total time (in second or ms) for each client request on our nginx server because from your tutorial only show :
        1. How many connection are on Nginx server
        2. How many connection are waiting,reading,writing
        3. total accept request on server
        Does Nginx have that setting that can see “server total time load”??
        Thank b4 for answering my question.
        *Note : I want to test my Nginx Server offline for my project..Sorry I’m Newbie

  • Glagola Oct 9, 2014 @ 17:02

    nginx -V – output info to stderr, so
    nginx -V | grep –color -o http_stub_status
    should be replaced with
    nginx -V 2>&1 | grep –color -o http_stub_status

  • vivek kumar May 11, 2017 @ 7:23


    What if nginx instance have many server blocks. Does it shows for cumulative servers or just for any particular server?


Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum