C/C++ 11/14 rewrites a std::function<…> function template that supports safety and no multiple copies, supports Lambda λ and overloaded operator()(…) operator structure and C/C++ language Ordinary functions.

As the title of this article indicates, it was rewritten for optimization, and the solid-size BUFF buffer provided by the standard library std::function implementation was cut off because it is no longer necessary. The implementation copies the shared pointer. Reference, instead of needing to copy the BUFF and reconstruct it like the official version. If […]

Smooth upgrade adds echo module, location configuration, and rewrite configuration

Smooth upgrade adds echo module, location configuration, and rewrite configuration Smooth upgrade process: Get compilation information of old versions Old version backup Compile a new version or new function (make install cannot be executed) Manually replace with new version and restart Verify new version Environmental preparation Operating system Old version New version New features CentOS-8 […]

nginx test rewrite

nginx test rewrite last: Equivalent to the (L) mark in Apache, indicating completion of rewrite matching; break: After the matching of this rule is completed, the matching will be terminated and subsequent rules will no longer be matched. # Where last and break are used to implement URL rewriting, the URL address in the browser […]

Smooth upgrade adds echo module, location configuration, and rewrite configuration

Smooth upgrade adds echo module, configures location and rewrite Smooth upgrade adds echo module View nginx version number and compilation information [root@localhost ~]# nginx -v nginx version: nginx/1.22.1 [root@localhost ~]# [root@localhost ~]# nginx -V nginx version: nginx/1.22.1 built by gcc 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC) built with OpenSSL 1.1.1k FIPS 25 Mar 2021 TLS […]

Nginx smooth upgrade & redirection rewrite

Nginx smooth upgrade & amp;redirect rewrite Environment description: Operating system Old version New version New features centos-8 nginx-1.22.1 nginx-1.24.0 echo-nginx -module To deploy nginx, please read nginx service and LNMP architecture & deploy Discuz forum system View the configuration information of the old version [root@localhost ~]# nginx -v nginx version: nginx/1.22.1 [root@localhost ~]# # details […]

rewrite directory mapping, configure nginx to receive https requests

1. Use rewrite to rewrite the url: /test/test1/test2/test.html /test.html Normal access: The browser address bar does not change. Temporary redirection: 302 Permanent redirection: 301 Step 1: Preparation->Create the corresponding directories and files [root@server ~]# mkdir mkdir /www/ip/129 -p [root@server ~]# mkdir test/test1/test2 -p [root@server ~]# echo “hello” > test/test1/test2/test.html [root@server ~]# echo “bye” > /www/ip/129/test.html […]

nginx smoothly upgrades to add echo module, localtion configuration, and rewrite configuration

nginx smoothly upgrades to add echo module, location configuration, and rewrite configuration Article directory nginx smoothly upgrades to add echo module, location configuration, and rewrite configuration 1.Environmental description: 2.nginx smooth upgrade principle: 3. Smoothly upgrade nginx and add echo module 3.1. View the current nginx version and old version compilation parameter information 3.2. Download nginx-1.24.0 […]