ngx_http_lua_module - Embed the power of Lua into Nginx HTTP Servers.
This module is a core component of OpenResty. If you are using this module, then you are essentially using OpenResty :)
This module is not distributed with the Nginx source. See the installation instructions.
- Name
- Status
- Version
- Videos
- Synopsis
- Description
- Typical Uses
- Nginx Compatibility
- Installation
- Community
- Code Repository
- Bugs and Patches
- LuaJIT bytecode support
- System Environment Variable Support
- HTTP 1.0 support
- Statically Linking Pure Lua Modules
- Data Sharing within an Nginx Worker
- Known Issues
- TCP socket connect operation issues
- Lua Coroutine Yielding/Resuming
- Lua Variable Scope
- Locations Configured by Subrequest Directives of Other Modules
- Cosockets Not Available Everywhere
- Special Escaping Sequences
- Mixing with SSI Not Supported
- SPDY Mode Not Fully Supported
- Missing data on short circuited requests
- TODO
- Changes
- Build And Test
- Test Suite
- Copyright and License
- See Also
- Directives
- Nginx API for Lua
- Obsolete Sections
Production ready.
This document describes ngx_lua v0.10.29, which was released on Oct 24, 2025.
-
YouTube video "Hello World HTTP Example with OpenResty/Lua"
-
YouTube video "Write Your Own Lua Modules in OpenResty/Nginx Applications"
-
YouTube video "OpenResty's resty Command-Line Utility Demo"
-
YouTube video "Measure Execution Time of Lua Code Correctly in OpenResty"
-
YouTube video "Precompile Lua Modules into LuaJIT Bytecode to Speedup OpenResty Startup"
You are welcome to subscribe to our official YouTube channel, OpenResty.
# set search paths for pure Lua external libraries (';;' is the default path):
lua_package_path '/foo/bar/?.lua;/blah/?.lua;;';
# set search paths for Lua external libraries written in C (can also use ';;'):
lua_package_cpath