nixos/httpd: set lua paths
We conditionally set the lua paths for the Apache mod_lua module. This allows executing Lua script handlers to require modules, that have been packaged with the supplied Lua derivation of Apache. For more information, see: https://httpd.apache.org/docs/2.4/mod/mod_lua.html#luapackagecpath https://httpd.apache.org/docs/2.4/mod/mod_lua.html#luapackagepath
This commit is contained in:
parent
f20d8091d4
commit
f2ca4c8f1d
|
@ -126,6 +126,13 @@ let
|
|||
</IfModule>
|
||||
'';
|
||||
|
||||
luaSetPaths = ''
|
||||
<IfModule mod_lua.c>
|
||||
LuaPackageCPath ${cfg.package.lua5}/lib/lua/${cfg.package.lua5.lua.luaversion}/?.so
|
||||
LuaPackagePath ${cfg.package.lua5}/share/lua/${cfg.package.lua5.lua.luaversion}/?.lua
|
||||
</IfModule>
|
||||
'';
|
||||
|
||||
mkVHostConf = hostOpts:
|
||||
let
|
||||
adminAddr = if hostOpts.adminAddr != null then hostOpts.adminAddr else cfg.adminAddr;
|
||||
|
@ -326,6 +333,8 @@ let
|
|||
|
||||
${sslConf}
|
||||
|
||||
${if cfg.package.luaSupport then luaSetPaths else ""}
|
||||
|
||||
# Fascist default - deny access to everything.
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
|
|
Loading…
Reference in a new issue