How to track which site is using the nginx processes and causing load


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » CustomBuild » CustomBuild 2.0 » Nginx

How to track which site is using the nginx processes and causing loadLast Modified: Nov 17, 2015, 1:36 am
If you're running nginx with custombuild 2.0, then it's already in the file:

/etc/nginx/nginx-info.conf


Change the "allow" lines to include your IP (eg: 1.2.3.4), OR remove the line completely to allow from all.

location /nginx_status {
   # Enable nginx status page
   stub_status on;

   # Disable status page logging in access_log
   access_log off;

   # Allow access from 127.0.0.1
   allow 1.2.3.4;

   # Deny all the other connections
   deny all;
}

OR

location /secret_nginx_status {
   # Enable nginx status page
   stub_status on;

   # Disable status page logging in access_log
   access_log off;
}

Change the /secret_server-status to something hard-to guess if you use the 2nd method, since we don't want just anyone viewing this page.

Note that the stats shown on this page are not terribly useful.
They only show the number of connections, and a small handful of numbers.
The default nginx install does not show information on each connection like apache does.

If needed, php-fpm has it's own status page, which is better than nothing if you're running nginx.
 
Related Helpfiles
How to track which site is using the apache processes and causing load

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST