Wildcard domains as vhost

António P. P. Almeida appa at perusio.net
Tue May 24 18:13:02 MSD 2011


On 24 Mai 2011 15h00 WEST, skebi69 at gmail.com wrote:

> [1 <multipart/alternative (7bit)>] [1.1 <text/plain; ISO-8859-1
> (7bit)>] I tried to google this but could not hit the right keywords
> (been a long week)...
>
> We have DNS set up so that all requests ending in
> .project.example.com (i.e.  bob.project.example.com) go to the same
> machine. How can I set up sites-enabled so that all requests for
> *.project.example.com get treated the same?

Cf. http://nginx.org/en/docs/http/server_names.html#wildcard_names

server {
  server_name *.project.example.com;
  (...)
}

--- appa




More information about the nginx mailing list