nginx-如何使用stub\u status创建/status

nginx-如何使用stub\u status创建/status,nginx,newrelic,Nginx,Newrelic,我试图创建一个/status用于newrelic,但它总是返回404 $ curl 127.0.0.1/status <html> <head><title>404 Not Found</title></head> <body> <center><h1>404 Not Found</h1></center> <hr><center>nginx/1.17.

我试图创建一个/status用于newrelic,但它总是返回404

$ curl 127.0.0.1/status
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.17.1</center>
</body>
</html>
$curl 127.0.0.1/状态
404找不到
404找不到

nginx/1.17.1
这是我的nginx conf文件(它也使用certbot)

服务器{
服务器名称mysite.com api.mysite.com painel.mysite.com;
地点/{
root/var/www/mysite prod/public;
index.php index.html index.htm;
try_files$uri$uri//index.php?$query_string;
}
地点~\.(菲律宾比索)(/.*)美元{
root/var/www/mysite prod/public;
fastcgi_split_path_info^(.+.(?:php|phar))(/.*);
fastcgi_截获_错误开启;
fastcgi_index.php;
包括fastcgi_参数;
fastcgi\参数脚本\文件名$document\根$fastcgi\脚本\名称;
fastcgi_参数路径_信息$fastcgi_路径_信息;
fastcgi_pass php fpm;
}
侦听443 ssl;#由Certbot管理
ssl_certificate/etc/letsencrypt/live/mysite.com/fullchain.pem;#由Certbot管理
ssl_certificate_key/etc/letsencrypt/live/mysite.com/privkey.pem;#由Certbot管理
include/etc/letsencrypt/options-ssl-nginx.conf;#由Certbot管理
ssl_dhparam/etc/letsencrypt/ssl-dhparams.pem;#由Certbot管理
}
服务器{
位置=/status{删除:

  location = /status {          <============== HERE
    stub_status  on;
    default_type text/plain;
    access_log   off;
    allow        127.0.0.1;
    deny all;
  }
重新加载Nginx配置:

sudo nginx -s reload
测试URL:

$ curl http://127.0.0.1/nginx_status
Active connections: 6
server accepts handled requests
 1285282 1285282 17041299
Reading: 0 Writing: 6 Waiting: 0
新舍利配置:

url=http://localhost/nginx_status
$ curl http://127.0.0.1/nginx_status
Active connections: 6
server accepts handled requests
 1285282 1285282 17041299
Reading: 0 Writing: 6 Waiting: 0
url=http://localhost/nginx_status