can multiple domain points a single nginx host with server_name ?

Maxim Dounin mdounin at mdounin.ru
Mon Apr 28 12:55:36 UTC 2014


Hello!

On Mon, Apr 28, 2014 at 05:13:57PM +0530, Joydeep Bakshi wrote:

> Hello list,
> 
> I am in a process to configure nginx infront of apache. For vhost having
> single domain like  www.mydomain.com & mydomain.com ; there is no issue to
> configure by server_name directive.
> 
> But what to do where multiple domain points to a single apache vhost using
> apache server_alias directive ? Can nginx server_name simply points all
> those domains to the required vhost of apache ?
> 
>  is
> 
> nginx  [ server_name  test1.com test2.com www.test3.com  ]
> 
> equivalent to
> 
> apache  [
> servername test1.com
> serveralias   test2.com www.test3.com ]
> 
> ?

Yes.

http://nginx.org/r/server_name

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list