default_server directive not respected

Francis Daly francis at
Thu Jan 29 12:48:14 UTC 2015

On Thu, Jan 29, 2015 at 12:50:41PM +0100, Lorenzo Raffio wrote:

Hi there,

>     listen 80;
>     listen 443 ssl default_server spdy;

> ... but it's not respected. If I point the A record of a domain I didn't
> add in a nginx server block, the first server block in alphabetical order
> is picked up (instead of the default_server).
> Why?

If your test request is https, it is worth further investigation.

If your test request is http, you should be aware that default_server
refers to the listen address:port, and you don't have one on port 80.

The usual "what request do you make / what response do you get / what
response do you expect" would help here.

Francis Daly        francis at

More information about the nginx mailing list