We already have an existing domain running in production (my.domain1) and we wanted to create another domain which will be hosted in a separate server (my.domain2) which will serve pages that are already available from the production domain. If I access "my.domain2/my_account.html", nginx should then get the content of the page from "my.domain1/profile.html". Unfortunately, I'm always getting 404 message. I've ready so many articles on how to use proxy_pass but I think I'm missing something. Please help.
Here is my configuration for domain1:
server {
listen 80;
root /var/www/domain1;
index index.html index.htm;
server_name my.domain1;
}
and here is for the domain2:
server {
listen 80;
root /var/www/domain2;
index index.html index.htm;
server_name my.domain2;
location /my_account.html {
proxy_pass http://my.domain1;
proxy_redirect off;
}
}