达到的效果:源站是https,然后访问反代服务器也是https。
使用军哥的 LNMP,反代配置如下:
location / {
sub_filter 123.com 123.net;
proxy_pass https://123.com;
proxy_set_header X-Real-IP 源站IP地址;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer https://123.com;
proxy_set_header REMOTE-HOST $remote_addr;
add_header X-Cache $upstream_cache_status;
proxy_set_header Accept-Encoding "";
sub_filter "123.com" "123.net";
sub_filter_once off;
expires 12h;
}