diff options
author | Daniel Nagy <danielnagy@posteo.de> | 2020-12-25 22:54:05 +0100 |
---|---|---|
committer | Daniel Nagy <danielnagy@posteo.de> | 2020-12-25 22:54:05 +0100 |
commit | f2ca4c8f1d237bc88b769f80332efcc4d0b531e5 (patch) | |
tree | eb2c11f489987f28974ee901805d5d7b9bd979e0 /nixos/modules/services/web-servers/apache-httpd/default.nix | |
parent | f20d8091d4b05298bb2376ca930110b1c1ae07a7 (diff) | |
download | nixpkgs-f2ca4c8f1d237bc88b769f80332efcc4d0b531e5.tar nixpkgs-f2ca4c8f1d237bc88b769f80332efcc4d0b531e5.tar.gz nixpkgs-f2ca4c8f1d237bc88b769f80332efcc4d0b531e5.tar.bz2 nixpkgs-f2ca4c8f1d237bc88b769f80332efcc4d0b531e5.tar.lz nixpkgs-f2ca4c8f1d237bc88b769f80332efcc4d0b531e5.tar.xz nixpkgs-f2ca4c8f1d237bc88b769f80332efcc4d0b531e5.tar.zst nixpkgs-f2ca4c8f1d237bc88b769f80332efcc4d0b531e5.zip |
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
Diffstat (limited to 'nixos/modules/services/web-servers/apache-httpd/default.nix')
-rw-r--r-- | nixos/modules/services/web-servers/apache-httpd/default.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index dc78728d663..de3c7d693d4 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -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 |