I'm trying to enable the Nginx status page on my Centos 7 server.
I installed Nginx from the EPEL repository, Nginx is built with staus page support:
[root@server ~]# nginx -V 2>&1 | grep -o with-http_stub_status_module
with-http_stub_status_module
I have added a single config file /etc/nginx/conf.d/status.conf:
server {
listen 80;
server_name localhost;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
}
After restart, Nginx can't find the status page:
[root@server ~]# wget http://localhost/nginx_status
--2017-01-06 17:02:09-- http://localhost/nginx_status
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-01-06 17:02:09 ERROR 404: Not Found.
Every tutorial or example I found online says these are the steps I should take. Why do I keep getting a 404?