reverse-proxy with nginx: using an existing https site as backend


I have one site somewhere that’s accessible on the internet as “https://site.example1.com”.

I also have one another site accessible on the internet as “https://www.example2.com”.

I have full control over both sites and they both have valid Certificates.

Now I want to have the first site to be accessible as a location on the second; this means that “https://www.example2.com/site” should display the contents of “https://site.example1.com”.

I tried a plain:

location /site {
    proxy_pass              "https://site.example1.com";
    rewrite                 /site/(.*) /$1     break;
    proxy_redirect          off;
    proxy_set_header        Host               $host;
}

but this does not work well because browser (accessing “https://www.example2.com/site”) is presented server certificates from backend (“https://site.example1.com”) which are invalid for the request.

How can I force nginx front-end to send out its own certificates and verify backend identity on its own?