How VeryNginx Extends Nginx with Lua for Advanced Firewall and Stats
VeryNginx, built on the lua_nginx_module, adds a powerful firewall, access statistics, and a web UI to Nginx, with clear installation steps, reverse‑proxy and static‑resource configuration examples, and customizable matching and response rules for security management.
Feature Introduction
VeryNginx is developed on top of the lua_nginx_module and provides advanced firewall capabilities, access statistics, and other functions. It runs inside Nginx, extending its core features while offering a user‑friendly web interface.
Installation
git clone https://github.com/alexazhou/VeryNginx.git cd VeryNginx python install.py installGraphical Reverse Proxy Configuration
The following example forwards all requests matching /verynginx to node 120, which is achieved by adding this configuration to Nginx:
http {
upstream demo {
server 172.17.0.120:8033;
}
server {
listen 80;
server_name verynginx.pigx.vip;
location / {
proxy_pass http://demo;
}
}
}Graphical Static Resource Configuration
This configuration maps requests matching /verynginx to the local directory /data/oss:
Matching Rule Definitions
IP Blacklist/Whitelist
Requests are filtered based on the client IP address; matching IPs trigger the corresponding response rule.
Weak Password Handling
All fields named password are examined for weak passwords, and matching cases invoke the defined response.
SQL Injection Handling
Parameters are checked for common SQL keywords; detections activate the associated response rule.
Response Rule Definition
When a request satisfies any of the matching rules, the configured response strategy is executed.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
