Location served by all virtual servers

Edho Arief me at myconan.net
Mon Jan 5 18:51:14 UTC 2015


On Tue, Jan 6, 2015 at 3:47 AM, Styopa Semenukha <semenukha at gmail.com> wrote:
> The hostname "domain1.com" is NOT matched by wildcard "*.domain1.com" (this
> only matches subdomains), so it gets served by the default virtual host. Since
> you don't have an explicit definiton of the default vhost, it's the first one
> (most likely, alphabetically). In your case, the default one is
> "*.domain2.com".
>
> Solution: add "domain1.com" and "domain2.com" server names to your config.

or use `.domain1.com` instead of `*.domain1.com` as documented in
http://nginx.org/r/server_name



More information about the nginx mailing list