Subdomains not working with nginx
I'm trying to setup subdomains in my droplet but they not seem to work. I've followed the tutorials (all of them I believe). I have two domain names pointing to the server: domain1.com and domain2.com. domain1.com works fine. domain2.com works fine. whatever.domain2.com redirects to domain1.com page. whatever.domain1.com redirects to domain1.com. I've setup DO DNSs and nginx config files to handle all domains and subdomains but they don't seem to work. Is it a DNS issue or a nginx issue? I don't know where else to look! Thanks.