default server with custom 404

Robin Becker robin at
Thu Apr 7 13:04:37 UTC 2016

On 07/04/2016 13:17, Francis Daly wrote:
> For every unique "listen IP" or "listen IP:80" directive that you
> have anywhere in your config, add the same line to this server{} with
> default_server set.
> (Which means: if you have somewhere "listen;", then you
> add a line "listen default_server;" to your catch-all
> server block.)
Ah I begin to see the light, I had thought the default_server attribute would 
force this irrespective of the listen now I see I have to allow listening with 
all the patterns eg IP1:80 IP1:443 IP2:80........ that makes things much 
clearer. Thank you very much.

> Good luck with it,
> 	f

Robin Becker

More information about the nginx mailing list