About the NGINX module
Last updated 2025-04-14
IMPORTANT
This guide only applies to Next-Gen WAF customers with access to the Next-Gen WAF control panel. If you have access to the Next-Gen WAF product in the Fastly control panel, you can only deploy the Next-Gen WAF with the Edge WAF deployment method.
You can use our NGINX module to deploy the Next-Gen WAF directly onto your hosting environment. In the module-agent deployment topology, the NGINX module accesses request data from incoming requests via the NGINX API. Then, the module passes the data to the Next-Gen WAF agent for inspection via remote procedure calls (RPC) through a Unix domain socket (UDS) or over transmission control protocol (TCP). The agent then tells the module how to handle the requests, and the module blocks, allows, or rate limits requests per the agent's direction.
Choosing an NGINX module variation
Our NGINX module has two variations:
- The NGINX dynamic module variation is compiled and then dynamically loaded into NGINX at runtime without recompiling the entire NGINX binary. This module is written in C and can be integrated with NGINX Open Source and NGINX Plus.
- The NGINX Lua module variation leverages OpenResty's Lua module for NGINX (often referred to as
ngx_http_lua_module
), which allows for embedded Lua code directly in your NGINX configuration. This module is written in the Lua scripting language and can be integrated with NGINX Open Source, NGINX Plus, and OpenResty.
Both module variations implement similar request handling logic to pass the request to the Next-Gen WAF agent for inspection.
The NGINX module variation you install depends on your business and hosting environment requirements.
TIP
If you're unsure which module variation to install and aren't already using OpenResty or NGINX Plus, we recommend installing the dynamic module for Stable NGINX Open Source because it doesn't have dependencies outside of NGINX itself.
Module variation | NGINX model | Module package name | Notes |
---|---|---|---|
Dynamic | Stable NGINX Open Source | nginx-module-fastly-nxs | This package is compiled with the corresponding Stable NGINX releases. We recommend using a Stable version of NGINX for production servers. |
Dynamic | Mainline NGINX Open Source | nginx-module-fastly-nxm | This package is compiled with the corresponding Mainline NGINX releases. The Mainline version of NGINX may contain bugs and we do not recommend using it for production servers. |
Dynamic | Distribution-provided NGINX Open Source | nginx-module-fastly-nxd | This package is compiled with the corresponding distribution-provided releases of NGINX. These distribution-provided releases may deviate from official nginx.org releases. |
Dynamic | NGINX Plus | nginx-module-fastly-nxp | This package is compiled with corresponding NGINX Plus releases and follows the latest naming convention for our NGINX modules. |
Dynamic | NGINX Open Source | nginx-module-sigsci-nxo | This package is compiled with the corresponding NGINX releases. Customers should switch to the stable, mainline or distribution-provided packages that is most appropriate to their use case. Certain upstream repositories that maintain their own NGINX releases may deviate from these builds and cause issues installing. |
Dynamic | NGINX Plus | nginx-module-sigsci-nxp | This package is compiled with the corresponding NGINX Plus releases. |
Lua | OpenResty | sigsci-module-nginx | |
Lua | NGINX Open Source | sigsci-module-nginx | ngx_http_lua_module must be installed. |
Lua | NGINX Plus | sigsci-module-nginx | nginx-plus-module-lua must be installed. |
Supported versions
Our Compatibility and requirements guide lists the distributions our NGINX module has packages available for. We update our NGINX module after a mainline NGINX release occurs. We will expedite a release when there are exceptions (e.g., critical vulnerability).
WARNING
NGINX and various other upstreams that supply NGINX builds often stop releasing or updating NGINX packages for certain distribution release repositories after a certain period of time, often coinciding with distribution end of life dates, which is outside of our control. This may mean that for certain distribution releases, certain versions of the module may not be available or the appropriate package may be outdated for your release. If you believe a package should be made available for your version on your platform, contact support@fastly.com.
Do not use this form to send sensitive information. If you need assistance, contact support. This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.