I have an http block where I include virtual hosts for the different domains hosted on the same server. For each virtual host I do:
Now, domain2.com works fine. However, when I do www.domain2.com it shows the page for domain1.com!
How to properly configure nginx? Does this have something to do whether
www is a CNAME or an A record?