title: nginx server_name wildcard or catch-all
body: <p>I have an instance of nginx running which serves several websites. The first is a status message on the server's IP address. The second is an admin console on <code>admin.domain.com</code>. These work great. Now I'd like all other domain requests to go to a single <code>index.php</code> - I have loads of domains and subdomains and it's impractical to list them all in an nginx config.</p>
  
  <p>So far I've tried setting <code>server_name</code> to <code>*</code> but that failed as an invalid wildcard. <code>*.*</code> works until I add the other server blocks, then I guess it conflicts with them.</p>
  
  <p>Is there a way to run a catch-all server block in nginx after other sites have been defined?</p>
  
  <p><em>N.B. I'm not a spammer, these are genuine sites with useful content, they're just powered by the same CMS from a database!</em></p>