In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to achieve automatic balance between Nginx cache files and dynamic files", the content is simple and clear, and I hope it can help you solve your doubts. Let me lead you to study and learn "how to achieve automatic balance between Nginx cache files and dynamic files".
Nginx
Nginx (engine x) is a high-performance HTTP and reverse proxy service, as well as an IMAP/POP3/SMTP service. Nginx was developed by Igor Sesoyev for the second most visited Rambler.ru site in Russia. 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, and is distributed under a BSD-like protocol. It is characterized by low memory and strong concurrency ability. in fact, the concurrency ability of nginx does perform well in the same type of web server. Chinese mainland uses nginx website users: Baidu, JD.com, Sina, NetEase, Tencent, Taobao and so on.
The following nginx configuration script is used to automatically determine whether there is a cache file, if there is a priority to output the cache file, without going through php, and if not, go back to php to process it and generate the cache file.
The PHP framework is ThinkPHP, and the last rewrite has something to do with it, so it's not negligible.
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;}
The above is all the contents of the article "how to achieve automatic balance between Nginx cache files and dynamic files". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.