Redirect arbitrary sub-domains to custom 404 when wild card A record is set?

Francis Daly francis at
Sun Nov 20 22:27:38 UTC 2011

On Sun, Nov 20, 2011 at 03:59:13PM -0500, anagio wrote:

Hi there,

> Is there a way to capture all requests to sub-domains which do not have
> a virtual host setup, and redirect to a custom 404 page?

That's called the default server.

In that server, you can redirect or respond any way you choose.

Francis Daly        francis at

More information about the nginx mailing list