Second domain on same droplet NOT working with NginX
I’m trying to use my NginX to host multiple websites on the same droplet.
I can access test.domain1.com and domain1.com with or without the use of default_server tag. However, accessing domain2.com just presents the contents of domain1.com (the server block with the default_server tag) without forwarding the url to domain1.com in the browser.
I’ve checked for typo in my configs but can’t find one. Secondly, neither the access.log nor the error.log have any issues.
The hostname of my droplet is domain1.com.
I’ve created 2 DNS entries: 1 for domain1.com and the other for domain2.com. Both have the same A and CNAME records.
@ A ip.add.re.ss www CNAME @ * CNAME @
My configs are: