How to setup dns to redirect app.example.com to another ip?
- by AZ.
I have a site www.example.com running on a hosting company.
Now I want to create a separate web app on my VPS and let it accessible via app.example.com
How can I set the DNS to redirect app.example.com to my VPS' ip address? CNAME or A Record?
Also, If I want to do a mail server on my VPS too, how to setup the DNS?
EDIT:
Existing site: www.example.com
Location: some hosting company that I don't control. It's running PHP with nginx I guess (or aphache)
New site (that I'm working on): app.example.com
Location: my VPS, it has an IP address, the VPS is running nodejs. It can run along with nginx but currently it's not.
I want the existing website continue working (as customer visit www.example.com) and I want customer to visit app.example.com for some new features.
The two websites are NOT on the same server and not using the same IP address.