If you see this page, the OpenResty web platform is successfully installed and working. Further configuration is required.
For online documentation and support please refer to openresty.org.
Thank you for using OpenResty.
OpenResty is running on this host. The bundled default page is shown because no virtual server has yet been configured for the hostname you used.
OpenResty is nginx with LuaJIT and a curated set of modules glued in. You can embed Lua directly inside location blocks to handle requests, run periodic background tasks with init_worker_by_lua, and connect to upstream services with the bundled cosocket library.
Because LuaJIT compiles hot paths down to native code, dynamic handlers run at speeds comparable to C modules without the build complexity.
/usr/local/openresty/nginx/conf/nginx.conf — main config./usr/local/openresty/nginx/conf/conf.d/ — per-site fragments./usr/local/openresty/lualib/ — pre-installed Lua libraries./usr/local/openresty/site/lualib/ — your own Lua libraries.server { ... } block into conf.d/yoursite.conf.location:location /hello {
content_by_lua_block {
ngx.say("hello from OpenResty")
}
}
Reload with openresty -s reload and request /hello from a browser.
Error and access logs default to /usr/local/openresty/nginx/logs/. Override them per site with the access_log and error_log directives in your server block.
srv-resty-1 · openresty