location ~[^?]*/$ {
rewrite /(.*) /$1 break;
proxy_pass http:/shop.domain.com;
proxy_redirect off;
proxy_set_header Host $host;
}
location / {
proxy_pass http://192.168.121.210:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
set $origin домен-оригинала-сайта;
location / {
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_set_header Accept-Encoding '';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass https://куда-коннектиться;
proxy_ssl_name $origin;
proxy_set_header Host $origin;
proxy_cookie_domain $origin $http_host;
proxy_redirect http://$origin/ https://$http_host/;
proxy_redirect https://$origin/ https://$http_host/;
sub_filter //www.$origin/ //$http_host/;
sub_filter //$origin/ //$http_host/;
sub_filter_once off;
sub_filter_types text/css application/javascript application/x-javascript image/svg+xml;
}