Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装一切成功,手动安装了最新的新了 OR,报这个错误。 #231

Open
Castleeee opened this issue Jul 27, 2019 · 2 comments

Comments

@Castleeee
Copy link

everything was installd successfully,but when us nginx -t, it boomd。

nginx: [emerg] unknown directive "balancer_by_lua_file" in /opt/verynginx/verynginx/nginx_conf/in_http_block.conf:3
nginx: configuration file /etc/nginx/nginx.conf test failed

i don't know how to fix it because i was new to lua&nginx.
please help me thank you.
求解答

@forkone
Copy link

forkone commented Sep 9, 2019

balancer_by_lua* 需要放在upstream context中,在其他位置不能识别,eg:
upstream vn_upstream{
server 127.0.0.1;
balancer_by_lua_file /opt/verynginx/verynginx/lua_script/on_banlance.lua;
keepalive 1024; #Connection pool
}

@wuxfun
Copy link

wuxfun commented Oct 27, 2021

everything was installd successfully,but when us nginx -t, it boomd。

nginx: [emerg] unknown directive "balancer_by_lua_file" in /opt/verynginx/verynginx/nginx_conf/in_http_block.conf:3 nginx: configuration file /etc/nginx/nginx.conf test failed

i don't know how to fix it because i was new to lua&nginx. please help me thank you. 求解答

请问下问题是否已解决?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants