#PROXY-START/

location ~* .(gif|png|jpg|css|js|woff|woff2)$
{

proxy_pass 目标网站;
proxy_set_header Host 目前网站;
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;
expires 12h;

}
location /
{

proxy_pass 目前网站;
proxy_set_header Host 目前网站;
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_ssl_name 目前网站;
proxy_ssl_server_name on;
proxy_redirect off;
add_header X-Cache $upstream_cache_status;

#Set Nginx Cache

proxy_set_header Accept-Encoding "";
sub_filter "目前网站" "自己反代域名";
sub_filter_once off;
    add_header Cache-Control no-cache;
    expires 12h;

}

#PROXY-END/