Enable FASTCGI CachingEdit the virtual host configuration file that must be enabled for caching.
Nano/etc/nginx/sites-enabled/vhost
Add the following line to the top of the file beyond the server{} directive:
Fastcgi_cache_path/etc/nginx/cache levels=1:2 keys_zone=myapp:100m inactive=60m;
Fastcgi_cache_key "$scheme $request_method$host$
Guide
Nginx is an open source high-performance HTTP server and reverse proxy server, while supporting the IMAP/POP3 Proxy service, is a free software, but also the operation and maintenance engineers will be a kind of server, the following I would simply say the installation of Nginx server and file resolution.
Simple installation
This tutorial is a CentOS 6.3 example, the package can be downlo
Using MemcacheMemcache is a general-purpose memory caching system.It is typically used to accelerate slow data access. The Nginxmemcached module provides a variety of instructions that can be configured to provide content directly to the memcache, thereby avoiding requests to the upstream server.In addition to the instructions, the module creates a $ memcached_key variable for performing a cache lookup. Before you can use Memcache lookup, you must set
Preface
Nginx is a high-performance HTTP server, which can be cached by proxy cache for static resources. The principle is that the static resources in accordance with certain rules of the local hard disk, and will be in memory to cache commonly used resources, so as to speed up the response of static resources. Configure proxy
: This article mainly introduces the Nginx series (14 nginx cache). If you are interested in the PHP Tutorial, refer to it. I. proxy module cache
1. configuration file
# Note: the paths specified by proxy_temp_path and proxy_cache_path must be in the same partition: proxy_temp_path/web/tmp/
nginx+ Keepalived+proxy_cache for Nginx high availability and cacheEnvironment:master:10.10.0.224slave:10.10.0.225Real Server 1:10.10.0.221Real Server 2:10.10.0.226vip:10.10.0.220Real Server installs Web services in advance.# yum Install Httpd-y# cd/var/www/html# Touch Test.html# echo "10.10.0.221" > test.html # Real Server1# echo "10.10.0.226" > test.html # Real Server2Master/slave:First, install NginxInst
First of all, question 1: nginx cache expiration time I set 300 seconds in conf to expire, but after I updated the blog log page 300 seconds, the page is not updated, as shown in: my friends are stunned! Implement the levi. cg. amarchives3066 text editor with 10 lines of JavaScript...
First, question 1: nginx cache exp
: This article mainly introduces nginx Reverse proxy, dynamic and static request separation, and nginx cache application, as well as using ngx_cache_purge to clear the specified URL. if you are interested in the PHP Tutorial, please refer to it. 1. nginx Reverse proxy configuration
# Tomcat
Java code
Upstr
Content caching is one of the most effective ways to significantly improve the performance of web sites. Next we will talk about nginx high-performance cache.Basic principles of content cachingCache GET requests.Use: browser cache, content delivery network, and/or reverse proxy cache.HTTP cache mechanism:1. The content cache
Nginx image, css, js cache, and nginxcssjs Cache
At the beginning, we set up the nginx environment to achieve load balancing and distributed clusters. Now we can use the nginx cache mechanism to optimize the speed. The following d
: This article mainly introduces the Nginx series (clearing the cache for nginx on the 15th day). If you are interested in the PHP Tutorial, refer to it. I. nginx module cleanup
1 .:Http://labs.frickle.com/nginx_ngx_cache_purge/Https://github.com/FRiCKLE/ngx_cache_purge
2. Installation
./configure --prefix=/web/
Nginx cache acceleration steps are as follows
One, add moduleThe Nginx cache shared by this article requires additional compilation of ngx_cache_purge modules. As for the download module, recompile will be said later.Second, nginx configurationTo use this caching feature, i
Depending on the documentation, you can use expires to completeThe instruction adds a Expires and a cache-control to the header of the response: (If the time is a negative no-cache, the reverse max-age = #, # is the number of seconds you specify the time) informationIf you do not want to cache a page, you can use expires-1; Use this relative to the header inside
Within the server{} of the configuration file, add one sentence:
The code is as follows
Copy Code
Location ~. * * *. (CSS|JS) $ {Add_header Cache-control ' No-store ';}
Add the following code to the HTTP block in the nginx.conf
#proxy_temp_path和proxy_cache_path指定的路径必须在同一分区Proxy_temp_path/tmp/proxy_temp_dir;#设置名称为nginx_cache, the memory cache space size is 500mb,30 Day
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.