Building from Source
Prerequisites
Install required system dependencies:
sudo apt-get install -y \
build-essential \
clang \
libclang-dev \
libc6-dev \
zlib1g-dev \
pkg-config \
libssl-dev \
protobuf-compiler \
nginx
Install Rust and Cargo:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Build Steps
- Clone the repository:
git clone https://github.com/DhananjayPurohit/ngx_l402.git
cd ngx_l402
- Build the module:
cargo build --release --features export-modules
The compiled module will be at target/release/libngx_l402_lib.so.
- Copy to your Nginx modules directory:
sudo cp target/release/libngx_l402_lib.so /etc/nginx/modules/
- Follow the remaining manual installation steps.