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
<br />In order to manage the vehicles enteri...
Let's take a look at the process of installin...
This article shares the specific code of the vue-...
1. Introduction Recently, I helped a friend to ma...
one. Why build a Nexus private server? All develo...
This article example shares the specific code of ...
Table of contents 1. Create a stored function 2. ...
Table of contents Product Requirements Ideas Prob...
Solve the problem of eight hours time difference ...
1. Install Python 3 1. Install dependency package...
Install linux7.2 Internet access configuration on...
MySQL supports three types of comments: 1. From t...
Today, when I was writing a small program, I used...
This article shares the MySQL precompilation func...
Preface The database deadlocks I encountered befo...