nginx缓存配置
程序员文章站
2022-05-18 09:31:45
...
server 192.168.1.204:80;
}
proxy_cache_path /data0/htdocs/www/aaa levels=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 X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache aaa;
proxy_cache_valid 200 10m;
}
以上就介绍了nginx缓存配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。