Monitor nginx status
Enable status page in configuration
Inside nginx main configuration file (usually, /etc/nginx/nginx.conf) or in a sub-file inside conf.d directory, insert this directive in main server block:
After changing nginx configuration files, test new settings via
before apply, reload or restart the service.If a output like the following is shown, everything is ok and it's safe to apply changes.
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Test from command line
To quickly test status page output from command line, run
Status will appear: