参考:
https://github.com/vozlt/nginx-module-vts#installation
https://github.com/kubernetes/ingress-nginx
nginx-module-vts第三方nginx status模块
安装第三方模块
nginx-module-vts
mkdir /usr/local/nginx/3rdmodules
cd /usr/local/nginx/3rdmodules
git clone git://github.com/vozlt/nginx-module-vts.git
./configure --user=nginx --group=nginx --prefix=/usr/local/tengine-2.1.2 --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/nginx/3rdmodules/nginx-module-vts
make && make install
server {
listen 80;
server_name 192.168.6.123;
auth_basic "secret";
auth_basic_user_file /usr/local/nginx/conf/.pass;
location /ngx_status {
stub_status on;
allow 127.0.0.1;
allow 192.168.8.0/24;
allow 192.168.9.0/24;
deny all;
}
location /ngx_statuss {
stub_status on;
vhost_traffic_status_display;
vhost_traffic_status_display_format html;
allow 127.0.0.1;
allow 192.168.8.0/24;
allow 192.168.9.0/24;
deny all;
}
}
时间: 2024-11-08 23:45:22