Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By Ecaz
I do apologize in advance if this has already been asked but I couldn’t find anything related to it.
I’m currently hosting two domains on my Ubuntu droplet, using Nginx. I’ve setup the DNS and the Virtual Host for each domain and it works. So domain1.com actually gives me the “first” domain and domain2.com gives me the second one. However, if I go to WWW.domain1.com I end up at the second domain, it doesn’t actually matter what I type before the domain name and I still end up at the second one. I tried adding a CNAME to the first domain.
CNAME: www => ecaz.net.
But it still end up at the wrong domain.
I created an A-record for each domain, maybe that is the issue? A Record: @ => Droplet IP
And this is a snippet from my virtual host file, listen 80;
server_name ecaz.net;
root /srv/www/ecaz.net/www;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
It looks the same for the other domain, just a different server name.
Any help would be appreciated, if you need more info let me know.