I just bought a small company and they use a hosting provider that basically just massively upmarks AWS’s prices. They use AWS RDS databases, and ec2 servers.
i want to save costs and move over to AWS to cut them out. However, I have one issue.
the company is a landing page builder, and people build their websites in our app. For their sites to have a custom domain, they need to have an A record pointed to our servers IP address.
It will not be a good thing to ask every user to change their DNS.
i’ve done some research that a reverse proxy or DNS failover solution could handle this.
but I wanted to reach out to see if there are any issues with this approach?
for example,
before migration:
proxy setup on a new server:
server {
listen 80;
server_name yourapp.com;
location / {
proxy_pass http://1.234.567.890;
proxy_set_header Host $host;
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;
}
}
after migration:
proxy setup after the servers are completely setup.
server {
listen 80;
server_name yourapp.com;
location / {
proxy_pass http://3.456.789.012;
proxy_set_header Host $host;
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;
}
}
what I am trying to achieve is users A records are always pointing to 1.234.567.890, they don’t need to do anything at all, however it gets forwarded to the new server I get setup at 3.456.789.012
i have not tried anything yet.
Beau Crabill is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.