删除nginx目录,重新安装nginx
./configure --user=nginx --group=nginx --with-http_ssl_module --with-stream --with-http_stub_status_module
装完后在主配置文件的server里面加上一个location
location /status {
stub_status on;
}
原文:https://www.cnblogs.com/tvblly/p/11966586.html