Step 3 – Enable “ngx_http_stub_status_module” in Nginx
If you use open source NGINX, your instances may lack the stub status module. Verify that your nginx binary includes the module before proceeding to Configuration:
$ nginx -V 2>&1| grep -o http_stub_status_module
http_stub_status_module
If the command output does not include http_stub_status_module, you must install an NGINX package that includes the module.
Step 4 – Configure and Verify a Nginx metrices at http://localhost:81/nginx_status
On each NGINX server, create a status.conf file in the directory that contains your other NGINX configuration files, such as /etc/nginx/conf.d/.
server {
listen 81;
server_name localhost;
access_log off;
allow 127.0.0.1;
# deny all;
allow 172.31.23.45;
allow 13.233.206.103;
location /nginx_status {
# Choose your status module
# freely available with open source NGINX
stub_status;
# for open source NGINX < version 1.7.5
# stub_status on;
# available only with NGINX Plus
# status;
# ensures the version information can be retrieved
server_tokens on;
}
}
Code language: PHP (php)
$ sudo systemctl restart nginx
$ sudo systemctl status nginx
BROWSER - http://3.110.105.162:81/nginx_status
Inside a Server - curl http://127.0.0.1:81/nginx_status
Code language: JavaScript (javascript)
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services โ all in one place.
Explore Hospitals
Hi Rajesh, good short overview. But how can your simple hint be done?:
I have a NGINX Reverse proxy running on a Raspberry, but can not find details, how to install NGINX with dynamic modules?
Thanks,
Joerg