How it works...
We use the listen directive to tell NGINX Plus to listen on a different port for this server block, so that we can isolate it from the main connections. In this instance, we have it listening on port 8188.
Next, we set status_zone, which needs to be defined within each server or http block directive in order to collect statistics. For this recipe, we simply have one zone within our statistics block directive called status-page. For other server block directives, you can either combine into one (for example, backend-zone) or track individually if you require unique statistics per directive.
In order to serve the static status.html file, we define the root path where the files are located. Then, we ensure any root calls (for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access