Here give an example, and detailed.
HTTP {[...][...]Proxy_cache_path/data/nginx/cache/one levels=1:2 keys_zone=one:10m max_size=10g;Proxy_cache_key "$host $request_uri";server {server_name www.centos.bz centos.bz;Root/home/www.centos.bz/web;Index index.php index.html index.htm;Location/{Proxy_pass http://127.0.0.1:8080;Proxy_set_header Host "Www.centos.bz";Proxy_set_header x-forwarded-for $proxy _add_x_for
Nginx Cache Configuration
first, set the format of a cache log, you can view the "MISS" and "hit" status in the log
Log_format Cache ' * * * $time _local ' * * * * $upstream _cache_status ' ***cache-control: $upstream _http_cache_control ' Expires: $upstream _
Recently, we are going to build an image server with nginx, which looks at nginx's powerful static file processing capabilities.
Because the image volume is relatively large, it runs separately from the web server (which is also nginx). Although it is useless for the web server to call images, it is a remote call, and it is certainly not as fast as the local file system, therefore, there is still room for
About Nginx cache, commonly used can be divided into two major categories:(1) Cache to client's local browser(2) cache to server localFor the first, cache to the client's local browser [ add_header cache-control "public" that is
Label: Hit
Purge
Proxy_cache
Nginx reprinted on http://linuxgp.blog.51cto.com/1708668/589824
I. nginx's proxy_cache module is said to be much better than squid for multi-core support.Required software:Wget http://labs.frickle.com/files/ngx_cache_purge-1.3.tar.gzPcre,nginx-0.8.29.tar.gz# Purge ModuleHttp://labs.frickle.com/nginx_ngx_cache_purge/InstallTar-zxvf ngx_cache_purge-1.0.tar.gzTar-zxvf
Nginx comes with cacheNginx has a separate process to scan the cache files on the disk and establish a cache index in memory. And there is a management process to make the cache out of date judgment, update and other operationsDefinition: can only be used in HTTP segmentsProxy_cache_path/dev/shm/
M
For the most recent work, I need to add a custom field (Ngx_queue) to the Nginx cache map in the data structure (ngx_http_file_cache_node_t) of the node in memory. To add this field, you must understand the life cycle of these memory nodes, from generation to extinction; otherwise, the new fields cannot be initialized when they are generated, and subsequent custom queue nodes cannot be inserted correctly
Nginx Cache
Nginx has two types of caching mechanisms: Fastcgi_cache and Proxy_cache
Let's talk about the difference between the two caching mechanisms.
The Proxy_cache function is to cache the contents of the backend server, possibly any content, including static and dynamic
Fastcgi_cache function is the
Tags: NGINX proxy rewrite cacheShare the next Nginx+rewrite+proxy+cache todayThe difference between Nginx and Apache1.nginx based on IP restrictionsSmall experiment:worker_processes 1;events { worker_connections 1024;}http { include mime.types; default_type
Yesterday tried to build the NuGet image server with Nginx, the mirror server requires two functions: 1) reverse proxy; 2) content cache.Using Nginx as the reverse proxy, the configuration is very simple, just add a server setting with Proxy_pass in/etc/nginx/nginx.conf:server { listen ; Listen [::]:80; server_name the host name of the mirro
Friends using the Nginx server may be aware of the need to set the HTML static page cache with page compression and expiration time settings, I would like to introduce to you the configuration method, including the Ico,gif,bmp,jpg,jpeg,swf,js,css, MP3 files are cached locally.
The server's bandwidth overhead can be reduced by nginx the static resources on the se
1. Scenario: Use proxy_cache to cache web static content files and html whole page cache after pseudo-static modification through rewrite.
Dynamic Content is dynamically obtained through Ajax, And the content remains consistent.
2. nginx Configuration
A. Add the cache file storage path
Vi/etc/
Turn from: http://ttcool.blog.51cto.com/1186572/1302866
1. Scenario: Use Proxy_cache to cache Web static content files and HTML full-page caching via rewrite pseudo static.
Dynamic content is dynamically acquired through Ajax, and content consistency is maintained.
2.nginx Configuration
A. Add cache file Save path
Vi/etc/ngi
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.