Skip to main content

Configuration

Depending on whether you have manually compiled NGINX or the precompiled package you are using, the module "ngx_http_stub_status_module" may or may not be installed, to check if it is or not you can use the following command:

nginx -V | grep -o with-http_stub_status_module
with-http_stub_status_module

In this example we see that it is installed so we can use it, otherwise we must compile NGINX by adding the module:

./configure \
  --prefix=/opt/nginx \
 --sbin-path=/opt/nginx/sbin \
 --conf-path=/opt/nginx/nginx.conf \
 --pid-path=/opt/nginx/run/nginx.pid \
 --with-http_ssl_module \
 --with-http_gzip_static_module \
 --with-http_stub_status_module

Status configuration in NGINX

Let's declare status in the nginx.conf file located in /etc/nginx.

image-1621330017300.png

Add /status to the right of location, as shown in the image.