|
776 | 776 | proxy_pass http://tomcat;
|
777 | 777 | }
|
778 | 778 |
|
779 |
| - # status page for all the peers: |
780 | 779 | location /server/status {
|
781 |
| - access_log off; |
782 |
| - allow 127.0.0.1; |
783 |
| - |
784 |
| - default_type text/plain; |
785 |
| - content_by_lua_block { |
786 |
| - local hc = require "resty.upstream.healthcheck" |
787 |
| - ngx.say("Nginx Worker PID: ", ngx.worker.pid()) |
788 |
| - ngx.print(hc.status_page()) |
789 |
| - } |
790 |
| - } |
791 |
| - |
792 |
| - # status page for all the peers: |
793 |
| - location /lua { |
794 |
| - default_type 'text/html'; |
795 |
| - lua_code_cache off; |
796 |
| - content_by_lua_file /home/tinywan/Openresty_Protect/First_Protect/lua/test.lua; |
797 |
| - } |
798 |
| - |
799 |
| - location /lua_get_redis { |
800 |
| - default_type 'text/html'; |
801 |
| - lua_code_cache off; |
802 |
| - content_by_lua_file /home/tinywan/Openresty_Protect/First_Protect/lua/get_redis.lua; |
803 |
| - } |
804 |
| - |
805 |
| - location /get_redis_iresty { |
806 |
| - default_type 'text/html'; |
807 |
| - lua_code_cache off; |
808 |
| - content_by_lua_file /home/tinywan/Openresty_Protect/First_Protect/lua/get_redis_iresty.lua; |
809 |
| - } |
810 |
| - |
811 |
| - location /get_main { |
812 |
| - default_type 'text/html'; |
813 |
| - lua_code_cache off; |
814 |
| - content_by_lua_file /home/tinywan/Openresty_Protect/First_Protect/lua/main.lua; |
| 780 | + access_log off; |
| 781 | + allow 127.0.0.1; |
| 782 | + |
| 783 | + default_type text/plain; |
| 784 | + content_by_lua_block { |
| 785 | + local hc = require "resty.upstream.healthcheck" |
| 786 | + ngx.say("Nginx Worker PID: ", ngx.worker.pid()) |
| 787 | + ngx.print(hc.status_page()) |
| 788 | + } |
815 | 789 | }
|
816 |
| - |
817 | 790 | }
|
818 | 791 |
|
819 | 792 | server {
|
|
869 | 842 | }
|
870 | 843 |
|
871 | 844 | ```
|
| 845 | ++ 状态查看,通过访问:`http://127.0.0.1/server/status` |
| 846 | +  |
872 | 847 | ### Redis、Lua、Nginx一起工作事迹
|
873 | 848 | + 解决一个set_by_lua $sum 命令受上下文限制的解决思路,已完美解决
|
874 | 849 | + - [x] [API disabled in the context of set_by_lua](https://github.com/openresty/lua-nginx-module/issues/275)
|
|
0 commit comments