Example: You have site under domain proxy.com, you want to show website from mirror.com on that domain, you can do the following code to make it work.
server {
listen 80;
server_name mirror.com www.mirror.com;
location / {
proxy_pass http://mirror.com;
proxy_set_header Host mirror.com;
}
}