mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
www-servers/nginx: add lua config if USE="nginx_modules_http_lua"
Start from commit
60736e686a
'resty.core' is now mandatorily loaded, and the 'lua_load_resty_core'
directive is deprecated. See also https://github.com/openresty/lua-nginx-module/pull/1501
If nginx is built with USE="nginx_modules_http_lua", there must have
resty.core (OpenResty or a module named 'resty') exist, otherwise nginx
will fail to start w/ messages like bellow:
nginx: [alert] failed to load the 'resty.core' module (https://github.com/openresty/lua-resty-core); ensure you are using an OpenResty release from https://openresty.org/en/download.html (reason: module 'resty.core' not found:
no field package.preload['resty.core']
no file './resty/core.lua'
no file '/usr/share/luajit-2.1.0-beta3/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core/init.lua'
no file '/usr/share/lua/5.1/resty/core.lua'
no file '/usr/share/lua/5.1/resty/core/init.lua'
no file './resty/core.so'
no file '/usr/local/lib/lua/5.1/resty/core.so'
no file '/usr/lib64/lua/5.1/resty/core.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './resty.so'
no file '/usr/local/lib/lua/5.1/resty.so'
no file '/usr/lib64/lua/5.1/resty.so'
no file '/usr/local/lib/lua/5.1/loadall.so') in /etc/nginx/nginx.conf:47
Closes: https://bugs.gentoo.org/726728
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39823
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -67,4 +67,6 @@ http {
|
||||
|
||||
# root /var/www/localhost/htdocs;
|
||||
#}
|
||||
|
||||
include /etc/nginx/*_vhost.conf;
|
||||
}
|
||||
|
||||
@@ -808,6 +808,12 @@ src_install() {
|
||||
if use nginx_modules_http_lua; then
|
||||
docinto ${HTTP_LUA_MODULE_P}
|
||||
dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown
|
||||
insinto /etc/nginx
|
||||
newins - 00-config.lua_vhost.conf <<-EOF
|
||||
lua_package_path "/etc/nginx/?.lua;;";
|
||||
EOF
|
||||
insinto /etc/nginx/resty
|
||||
touch "${ED}"/etc/nginx/resty/core.lua
|
||||
fi
|
||||
|
||||
if use nginx_modules_http_auth_pam; then
|
||||
Reference in New Issue
Block a user