To build a RPM package manually
OS: CentOS Linux 7+, Fedora, Rhel7, Amzn Linux
- Copy nginx-module-vts.spec,init.sh file into /root/
- Run
cd /root/ chmod +x init.sh ./init.sh
- Add following entry into /etc/nginx/nginx.conf
#load modules
load_module modules/ngx_http_vhost_traffic_status_module.so;
http {
vhost_traffic_status_zone;
}
- Add following entry into /etc/nginx/conf.d/default.conf
server {
location /status {
vhost_traffic_status_display;
vhost_traffic_status_display_format prometheus;
}
}
- Restart Nginx
nginx -t
systemctl restart nginx
- Test using curl
curl http://localhost/status