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.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
How VeryNginx Extends Nginx with Lua for Advanced Firewall and Stats

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 install

Graphical 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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ConfigurationfirewallNginxreverse proxyLuaWeb Security
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.