Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changes-entries/lua_root_context.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*) mod_lua: LuaRoot is now allowed only in server config and virtual
host context, matching where it has always taken effect.
[fattylin0110 <fatty0110 gmail.com>]
11 changes: 9 additions & 2 deletions docs/manual/mod/mod_lua.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1309,15 +1309,22 @@ collectgarbage() -- close the handle via GC
<description>Specify the base path for resolving relative paths for <module>mod_lua</module> directives</description>
<syntax>LuaRoot /path/to/a/directory</syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context>
</contextlist>
<override>All</override>
<compatibility>Allowed only in server config and virtual host context
in version 2.5.1 and later; earlier versions also accepted it in
directory and .htaccess context, where it applied to the whole
virtual host.</compatibility>

<usage>
<p>Specify the base path which will be used to evaluate all
relative paths within <module>mod_lua</module>. If not specified they
will be resolved relative to the current working directory,
which may not always work well for a server.</p>

<p>The directive applies to the whole virtual host and must appear
before any <directive module="mod_lua">LuaPackagePath</directive> or
<directive module="mod_lua">LuaPackageCPath</directive> directive whose
argument it should resolve.</p>
</usage>
</directivesynopsis>

Expand Down
2 changes: 1 addition & 1 deletion modules/lua/mod_lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ static const char *register_authz_provider(cmd_parms *cmd, void *_cfg,

static const command_rec lua_commands[] = {

AP_INIT_TAKE1("LuaRoot", register_lua_root, NULL, OR_ALL,
AP_INIT_TAKE1("LuaRoot", register_lua_root, NULL, RSRC_CONF,
"Specify the base path for resolving relative paths for mod_lua directives"),

AP_INIT_TAKE1("LuaPackagePath", register_package_dir, NULL, OR_ALL,
Expand Down