Enable nginx status page

Discussion in 'ISPConfig 3 Priority Support' started by DylanPedro, Jun 13, 2021.

  1. DylanPedro

    DylanPedro Member HowtoForge Supporter

    Hi,

    I would like to enable the following nginx status page:
    https://nginx.org/en/docs/http/ngx_http_stub_status_module.html

    Using something like this:
    Code:
    location /nginx_status {
              stub_status;
              allow 127.0.0.1; #only allow requests from localhost
              deny all; #deny all other hosts
    }
    What is the best way to do this?
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    For every site? Or just one?
     
  3. DylanPedro

    DylanPedro Member HowtoForge Supporter

  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can add it as directive under Sites -> example.com -> Options -> nginx directives.
     
  5. DylanPedro

    DylanPedro Member HowtoForge Supporter

  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You could try setting up a site with domain "127.0.0.1" in ISPConfig as site.
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I think you can simply add it in your ISPConfig apps.vhost, with your PC public ip instead, test then restart nginx and view it from there. You also don't need to use /nginx_status as it can be /anything/that/you/like in its place. And if you need to protect that named path for nginx status, I assume you may also add username and password to it to strengthen its security. But except for the first one, I won't do all that simply to view basic nginx status.
     

Share This Page