Currently I'm using a
LAMP configuration for both my landing page page, for the web app, and for the APIs. Now I'd like to split these things across multiple Virtual Servers (VS). I'm unsure of the network settings and before messing up all my DNS configurations I'd like to understand if I'm about to crash my configuration.
The landing page is hosted at the
second level domain (e.g.
myurl.com), the web app is hosted at the lower level domain
app.myurl.com, and the api at
api.myurl.com. I also have a preview domain:
preview.myurl.com, used for testing.
Since everything is hosted on the same VS, I currently have also four different folders (
preview), that act as "virtual hosts" for each subdomain.
My DNS configuration looks like this:
myurl.com. A 300 18.104.22.168 www.myurl.com. CNAME 300 myurl.com. api.myurl.com. CNAME 300 myurl.com. app.myurl.com. CNAME 300 myurl.com. preview.myurl.com. CNAME 300 myurl.com.
To start I'd like to change the data of each CNAME entry to the actual IP of the current VS. So that it would look like this:
myurl.com. A 300 22.214.171.124 www.myurl.com. CNAME 300 myurl.com. api.myurl.com. CNAME 300 126.96.36.199 app.myurl.com. CNAME 300 188.8.131.52 preview.myurl.com. CNAME 300 184.108.40.206
Then the idea is to point each subdomain to the proper VS. Initially all lower level domains (except for
www.) will still be pointing to the current VS, while the second level domain for the landing page (
A record for
myurl.com.) will need to point to a new
IP for a new VS.
- Will these changes affect the way in which the current Apache Server is distributing the traffic to each subfolder (i.e.
preview)? If so, even if all
IPaddresses remain the same?
- To test things out, could I start by changing only the
preview.myurl.com.without risking of compromising the rest?
- Once all lower level domains (e.g. api.myurl.com) point to the IP of the VM, can I point the
myurl.com.to a different IP without compromising the other lower level domains (