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
If you use docker for large-scale development but...
This article shares with you a compound motion im...
"Development is more than just writing code&q...
One sentence to introduce HOC What is a higher-or...
Table of contents 1. What is an event? 2. Enable ...
Preface If our business is at a very early stage ...
Preface The keywords of MySQL and Oracle are not ...
I wrote this blog to remember that I just install...
CSS (Cascading Style Sheet) is used to beautify H...
1. Server environment configuration: 1. Check dis...
First, let's talk about why we use provide/in...
Recently, an error occurred while starting MySQL....
The database enables slow query logs Modify the c...
MySQL version: MySQL Community Edition (GPL) ----...
need: The official website's resource server ...