宝塔nginx反向代理
目录代理
生成的nginx配置内容 访问 aaaa.com/wp-content 代理到 xxx.com/wp-content
#PROXY-START/wp-content location ~* \.(gif|png|jpg|css|js|woff|woff2)$ { proxy_pass https://varyonmachinery.com; proxy_set_header Host varyonmachinery.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; expires 12h; } location /wp-content { proxy_pass https://xxx.com; proxy_set_header Host 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_ssl_server_name on; add_header Referrer-Policy no-referrer; add_header X-Cache $upstream_cache_status; #Set Nginx Cache add_header Cache-Control no-cache; } #PROXY-END/wp-content |