I run three vhosts on my nginx 1.1.9 server. example.com sub1.example.com and sub2.example.com. Each one has the server name explicitly defined in it's vhost config file. There are no config entries for _ and nothing to fall back on. All domains that should be used are explicitly defined.
sub2 is only spun up when required for specific purposes. I have nginx configured in a Debian/buntu style config with sites-available and sites-enabled. When I remove the symlink in sites-enabled for sub2, sub2 loads the files from example.com and hence its database resources. The URL in the address bar retains the sub2 prefix. I tested this with sub1.example.com by removing the sites-enabled symlink and it behaves the same way, returning data that should only be available through example.com.
Why are my two subdomains even responding to requests when there is no vhost that matches a server name for them? There's nothing in my logs to suggest what's causing this.
Edited 1 time(s). Last edit at 10/08/2013 01:09PM by HittingSmoke.