nginx upstream跨机房优化

  sre


upstream wordpress_server {
server 10.0.0.1:443;
keepalive 3600;
}
proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=static_cache:100m;

server {
location ~ \.(css|js|jpg|png|gif|ico)$ {
proxy_cache static_cache;
proxy_pass https://wordpress_server;
}

location / {
proxy_pass https://wordpress_server;
access_log /data/www_access.log;
error_log /data/www_error.log;
}

}

One Reply to “nginx upstream跨机房优化”

LEAVE A COMMENT

Captcha Code