|
|
发表于 2019-12-17 13:37:57
|
显示全部楼层
|
[ol]#PROXY-START/location /wp-admin{ expires 12h; if ($request_uri ~* "(php|jsp|cgi|asp|aspx)") { expires 0; } proxy_pass https://www.xxx.com; proxy_pass_header Set-Cookie; proxy_set_header Host www.xxx.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; #持久化连接相关配置 proxy_connect_timeout 30s; proxy_read_timeout 86400s; proxy_send_timeout 30s; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; add_header x-cache $upstream_cache_status; #Set Nginx Cache proxy_cache cache_one; proxy_cache_key $host$uri$is_args$args; proxy_cache_valid 200 304 301 302 1440m;}location /{ expires 12h; if ($request_uri ~* "(php|jsp|cgi|asp|aspx|/wp-admin.*)") { expires 0; } proxy_pass https://www.xxx.com; proxy_pass_header Set-Cookie; proxy_set_header Host www.xxx.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; proxy_ignore_headers Cache-Control Expires Vary; #持久化连接相关配置 proxy_connect_timeout 30s; proxy_read_timeout 86400s; proxy_send_timeout 30s; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; add_header x-cache $upstream_cache_status; #Set Nginx Cache proxy_cache cache_one; proxy_cache_key $host$uri$is_args$args; proxy_cache_valid 200 304 301 302 1440m;}#PROXY-END/[/ol]复制代码 |
|