3

I want to monitor each nginx virtual hosts(I have multiple nginx config for different domain) and found nginx module ngx_http_stub_status_module

But seems this module is for displaying server wide status not by per virtual hosts. Is there any solution to gather vhost stat information?

4

You can try Nginx virtual host traffic status module however, it only works for compiled Nginx. Simply compile your nginx with this module and add the following directives to your vhosts or as per the documentation:

 location /status {
            vhost_traffic_status_display;
            vhost_traffic_status_display_format html;
        }

Hope it meet your needs.

Regards,

Kheshav

  • Thanks sir for your answer! I was wondering what would happen if I compile nginx again when it's already installed from the repository? – KevinOelen Nov 16 '15 at 7:02
  • Well that depends on your configuration and modules you installed. A better approach would be to compile the Nginx same version as the RPM one. Also I would recommend that you backup your configurations etc. If the answer meet the requirements of your question and solved your problem please do vote it as an answer, – Kheshav Sewnundun Nov 16 '15 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.