Set default nginx-conf in sites-enabled?

Francis Daly francis at
Fri Aug 2 12:54:54 UTC 2013

On Fri, Aug 02, 2013 at 08:38:28AM -0400, lennart wrote:

Hi there,

> I've several config-files in sites-enabled, all working fine. However, if a
> domain ( not is mentioned in a config, NGINX takes the conf-file
> of How can i overrule this and make some sort of catch-all?

If a server name is not mentioned in any relevant server block, nginx
chooses the default server for this ip:port.

Make your "catch-all" be the default for this "listen" ip:port combination.

> With the line in the default-config i get an error 500:

What does the error log say?

Francis Daly        francis at

More information about the nginx mailing list