Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 1.37 KB

log_by_lua_file.md

File metadata and controls

35 lines (19 loc) · 1.37 KB

log_by_lua_file

语法: log_by_lua_file <path-to-lua-script-file>

环境: http, server, location, location if

阶段: log

除了通过文件<path-to-lua-script-file>的内容指定 Lua 代码外,该指令与log_by_lua是等价的,该指令从v0.5.0rc32开始支持Lua/LuaJIT bytecode的执行。

当给定了一个相对路径如foo/bar.lua,它将会被转换成绝对路径,前面增加的部分路径是 Nginx 服务启动时通过命令行选项-p PATH决定的server prefix

该指令是在v0.5.0rc31版本第一次引入。

Back to TOC

English source:

log_by_lua_file

syntax: log_by_lua_file <path-to-lua-script-file>

context: http, server, location, location if

phase: log

Equivalent to log_by_lua, except that the file specified by <path-to-lua-script-file> contains the Lua code, or, as from the v0.5.0rc32 release, the Lua/LuaJIT bytecode to be executed.

When a relative path like foo/bar.lua is given, they will be turned into the absolute path relative to the server prefix path determined by the -p PATH command-line option while starting the Nginx server.

This directive was first introduced in the v0.5.0rc31 release.

Back to TOC