Default response

This is the OpenResty default page. The server is built on nginx and extended with Lua scripting through ngx_lua. No site or route has been bound to this hostname yet.

Configure a site

  1. Edit /usr/local/openresty/nginx/conf/nginx.conf or add a file under conf.d/.
  2. Define a server { ... } block with the desired listen, server_name, and location directives.
  3. Reload: openresty -s reload.

Run Lua code

Embed Lua directly inside a location with content_by_lua_block { ngx.say("hello") }. For longer scripts, point content_by_lua_file at a .lua file.

Reference

Documentation at openresty.org. ngx_lua module docs at github.com/openresty/lua-nginx-module.

node-edge-tokyo-9