git clone https://github.com/zls0424/ngx_req_status.git
cd /root/nginx1.17.2/nginx-1.16.0
patch -p1 < /root/nginx1.17.2/ngx_req_status/write_filter-1.7.11.patch
./configure --user=www --group=www --prefix=/usr/local/nginx --with-openssl=/root/nginx1.17.2/nginx-1.16.0/openssl --add-module=/root/nginx1.17.2/nginx-1.16.0/ngx_brotli --add-module=/root/nginx1.17.2/ngx_req_status --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-stream --with-stream_ssl_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --with-cc-opt=-Wno-error --with-openssl-opt=enable-weak-ssl-ciphers
make
nginx.conf
http {
req_status_zone server_name $server_name 256k;
req_status_zone server_addr $server_addr 256k;
req_status server_name server_addr;
}
server {
location /req-status {
req_status_show on;
allow 10.0.0.0/8;
allow 127.0.0.1;
deny all;
}
}
https://www.jb51.net/article/78421.htm
http { req_status_zone server_name $server_name 256k; req_status_zone server_addr $server_addr 256k; req_status_zone server_url $server_name$uri 256k; req_status server_name server_addr server_url; 在某个网站里配置这个,可以看到所有网站的信息: server { lisent 80; server_name localhost; location /req-status { req_status_show on; } } }
curl http://127.0.0.1/req-status
评论已关闭!