35 | OpenResty: A more flexible web server

In the previous lecture, we saw the high-performance web server Nginx, which takes up less resources and has high processing power. It is the first choice for building websites. Although Nginx has become the undisputed “king” of the web server field, it is not without its shortcomings. After all, it is already 15 years old. […]

Openresty implements dynamic IP banning through Lua+Redis

Request background In order to block certain crawlers or malicious users from making requests to the server, we need to establish a dynamic IP blacklist. For IPs in the blacklist, services will be denied. and can be set to invalidate 1. Install Openresty (compile and install) wget https://openresty.org/download/openresty-1.19.3.1.tar.gz # Unzip openresty tar -zxvf openresty-1.19.3.1.tar.gz Download […]

Openresty (twenty-one) ngx.balance and balance_by_lua grayscale release

1 openresty implements grayscale publishing ① Grayscale release Note: The ‘early’ blog interprets the ‘concepts’ released by ‘Grayscale’ and explains the grayscale implementation of ‘native nginx’ Follow-up: Mainly use the grayscale release of ‘node traffic’, and pay attention to the ‘gray grayscale strategy’ Related reference ② Review the HTTP reverse proxy process ngx_http_upstream Available ‘operation’ […]

Openresty (twenty-two) ngx.balance and balance_by_lua final chapter

1. Grayscale release paving the way ① init_by_lua* init_by_lua init_by_lua_block Features: Executed during openresty ‘start’, ‘reload’, and ‘restart’, belonging to the ‘master init’ phase Mechanism: nginx ‘master’ When the main process ‘loads the configuration file’, it runs the ‘Lua code’ specified by the parameters on the global Lua VM level. Scenario: Want to do a […]

Use openresty to create an IP address query interface

Foreword OpenResty is a high-performance web application server based on Nginx that integrates the Lua programming language to enable developers to quickly build flexible and scalable web applications. With OpenResty, you can take advantage of the powerful performance features of Nginx and the programming capabilities of Lua to handle complex business logic and achieve high […]

Openresty (Nginx) intranet installation, step-by-step detailed instruction + installation package attached

Openresty (nginx) configuration document 1. Basic Linux commands Check whether the nginx process is started: ps -ef | grep nginx Turn off the firewall: systemctl stop firewalld Open port 80: firewall-cmd –zone=public –add-port=80/tcp –permanent Close port 80: firewall-cmd –permanent –remove-port=80/tcp Check whether port 80 is open: firewall-cmd –query-port=80/tcp Reload the firewall: firewall-cmd –reload //Need to […]

Building a collection server based on OpenResty

OpenResty introduction OpenResty (also known as: ngx_openresty) is a scalable Web platform based on NGINX. It was initiated by Chinese Zhang Yichun and provides many high-quality third-party modules. OpenResty is a powerful web application server. Web developers can use the Lua scripting language to mobilize various C and Lua modules supported by Nginx. More importantly, […]