Home >Backend Development >PHP Tutorial >nginx cache configuration

nginx cache configuration

WBOY
WBOYOriginal
2016-08-08 09:24:37894browse
Enter the configuration file: vi /usr/local/webserver/nginx/conf/nginx.conf upstream www.linux.com{
                              server 192.168.1.204:80;     }                                                                                                                                    s =1:2 keys_zone=aaa:20m max_size=1g;
server {
listen 80;
server_name www.linux.com;
location / {
proxy_pass http://www.linux.com;
proxy_set_header Host $host;
           proxy_set_header    proxy_cache_valid 200 10m;
webserver/nginx/sbin/nginx -s reload

The test effect of accessing the page is as follows



Complete The above introduces the nginx cache configuration, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn