Question
DNS configuration 2 domains
Hello,
I have one droplet with 2 distinct DNS entries pointing to it.
domain1.ca. 1800 IN A [ip]
domain1.ca. 1800 IN NS ns1.digitalocean.com.
domain1.ca. 1800 IN NS ns2.digitalocean.com.
domain1.ca. 1800 IN NS ns3.digitalocean.com.
www.domain1.ca. 1800 IN CNAME domain1.ca.
*.domain1.ca. 1800 IN A [ip]
domain2.com. IN SOA ns1.digitalocean.com. hostmaster.domain2.com. 1412268938 10800 3600 604800 1800
domain2.com. 1800 IN A [ip]
domain2.com. 1800 IN NS ns1.digitalocean.com.
domain2.com. 1800 IN NS ns2.digitalocean.com.
domain2.com. 1800 IN NS ns3.digitalocean.com.
www.domain2.com. 1800 IN CNAME domain2.com.
my nginx has those 2 configs:
server {
server_name domain2.com www.domain2.com;
…
}
server {
server_name domain1.ca www.domain1.ca;
…
}
My problem is that , if i go to whatever.domain1.ca, nginx leads to my domain2 config.
I tried to play with A and CNAME with no solution, any help?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×