I have many sub-domains set to my development machine like the following.
- test1.example.com => 192.168.0.7
- test2.example.com => 192.168.0.7
- ... (about 30 domains like this)
I have many sites on my dev server and Apache can handle those based on the domain name.
However, I feel bad about setting the fixed IP. So I want to use aliases like so:
- default.example.com => 192.168.0.7
- test1.example.com => (CNAME) default.example.com
- test2.example.com => (CNAME) default.example.com
The advantage here is when the dev server's IP is changed, I only need to change one instead of many.
If I request test1.example.com
from the Apache server, does it take it as test1.example.com
or default.example.com
?