nginx Nginx (engine x) is a high-performance HTTP and reverse proxy server, as well as an IMAP/POP3/SMTP server. Nginx was developed by Igor Sysoev for the second most visited site in Russia, Rambler.ru (Russian: Рамблер). The first public version 0.1.0 was released on October 4, 2004. Nginx is a lightweight web server/reverse proxy server and email (IMAP/POP3) proxy server released under a BSD-like protocol. Its characteristics are that it occupies less memory and has strong concurrency capabilities. In fact, nginx's concurrency capabilities are indeed better than those of the same type of web servers. Users of nginx websites in mainland China include: Baidu, JD.com, Sina, NetEase, Tencent, Taobao, etc. The purpose of the following nginx configuration script is to automatically determine whether there is a cache file. If there is, the cache file will be output first without going through PHP. If not, it will return to PHP for processing and generate the cache file at the same time. The PHP framework is ThinkPHP, the last rewrite is related, and it can be ignored if it is not based on this framework. location ~* ^/xx/yy/main.*$ { set $scenic_id 0; if ($request_uri ~* "scenic_id=([0-9]+)") { set $scenic_id $1; } if (-f $document_root/Html/json/$scenic_id.json) { rewrite ^(.*)$ /Html/json/$scenic_id.json last; } rewrite ^/(.*)$ /index.php/$1 last; #try_files @json $uri; } Summarize The above is the configuration script for automatic balancing of Nignx cache files and dynamic files introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
>>: JavaScript generates random graphics by clicking
1. Dynamic parameters Starting from 2.6.0, you ca...
The official document states: By injecting the ro...
In the SQL like statement, for example SELECT * F...
The semantics, writing style, and best practices ...
grammar background: linear-gradient(direction,col...
Portainer Introduction Portainer is a graphical m...
Table of contents Pull a centos image Generate ng...
This article shares the specific code of the vue-...
1. New and old domain name jump Application scena...
1. Download the installation package -Choose the ...
What is volume? Volume means capacity in English,...
Pull the image: [mall@VM_0_7_centos ~]$ sudo dock...
This database query statement is one of 50 databa...
This article uses examples to describe the manage...
1. What is SQL injection? Sql injection is an att...