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

who aer your? please help me. #3

Closed
441211324 opened this issue Feb 15, 2017 · 2 comments
Closed

who aer your? please help me. #3

441211324 opened this issue Feb 15, 2017 · 2 comments

Comments

@441211324
Copy link

441211324 commented Feb 15, 2017

git clone ....

drwxr-xr-x 2 root root 4096 Feb 15 11:41 conf.d
-rw-r--r-- 1 root root  964 Apr 21  2015 fastcgi_params
-rw-r--r-- 1 root root 2837 Apr 21  2015 koi-utf
-rw-r--r-- 1 root root 2223 Apr 21  2015 koi-win
-rw-r--r-- 1 root root 3957 Apr 21  2015 mime.types
-rw-r--r-- 1 root root 1496 Feb 15 11:49 nginx.conf
-rw-r--r-- 1 root root  954 Feb 15 11:38 nginx.conf_bak
drwxr-xr-x 4 root root 4096 Feb 15 11:45 ngx_lua_reqstatus
-rw-r--r-- 1 root root  596 Apr 21  2015 scgi_params
-rw-r--r-- 1 root root  623 Apr 21  2015 uwsgi_params
-rw-r--r-- 1 root root 3610 Apr 21  2015 win-utf

vi ....


     45     #QPS监控
     46     lua_shared_dict statics_dict    1M; # 初始化变量
     47     lua_package_path "/etc/nginx/ngx_lua_reqstatus/?.lua";  #路径
     48     log_by_lua_file "/etc/nginx/ngx_lua_reqstatus/hook.lua"; #  添加此句
     49 
     50     server {
     51         listen 80;
     52         server_name feichuanbuke.com;     
     53         location /{
     54             ...
     55         }
     56     }
     57 
     58     # 监控服务
     59     server {
     60         listen 127.0.0.1:6080;
     61         location /{
     62             content_by_lua_file "/etc/nginx/ngx_lua_reqstatus/status.lua";
     63         }
     64     }

/etc/init.d/nginx restart

`nginx: [emerg] unknown directive "lua_shared_dict" in /etc/nginx/nginx.conf:46
nginx: configuration file /etc/nginx/nginx.conf test failed`

@zheng-ji
Copy link
Owner

你的nginx 版本需要支持lua 扩展的

@441211324
Copy link
Author

好的!

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

2 participants