mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +03:00
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
1 changed files with 9 additions and 0 deletions
|
@ -126,6 +126,13 @@ let
|
||||||
</IfModule>
|
</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:
|
mkVHostConf = hostOpts:
|
||||||
let
|
let
|
||||||
adminAddr = if hostOpts.adminAddr != null then hostOpts.adminAddr else cfg.adminAddr;
|
adminAddr = if hostOpts.adminAddr != null then hostOpts.adminAddr else cfg.adminAddr;
|
||||||
|
@ -326,6 +333,8 @@ let
|
||||||
|
|
||||||
${sslConf}
|
${sslConf}
|
||||||
|
|
||||||
|
${if cfg.package.luaSupport then luaSetPaths else ""}
|
||||||
|
|
||||||
# Fascist default - deny access to everything.
|
# Fascist default - deny access to everything.
|
||||||
<Directory />
|
<Directory />
|
||||||
Options FollowSymLinks
|
Options FollowSymLinks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue