If you want to monitor your Nginx server status and all connections per second just like Apache mod_status unde Debian or any Linux/Unix distribution follow this tutorial.

By default, Nginx web server comes with a module called  HttpStubStatusModule that provides information on Nginx active connections, connections per second and other.

This tutorial will show you how to enable this feature in Debian Squeeze:

1. Configure Ngins Status:

First, open the nginx.conf file. On Debian, this is located under the /etc/nginx directory.

# vi nginx.conf

Then add the followings in context location or under every virtualhost that you have configured:

location /nginx_status {
#This turn on stats
stub_status on;
access_log off;
#You can allow only from your home IP address or from any location
allow 192.168.1.100; #Let's day that this is your IP
#Uncomment the next line if you want to allow access to this from anywhere
#allow all;
deny all;
}

2. Save and close the file and reload nginx server:

/etc/init.d/nginx restart
[ ok ] Restarting nginx: nginx.

OR Continue Reading…

Page 1 of 11