server_name for https

Pascal Nitsche pascal.nitsche at fansubcode.org
Mon May 9 13:48:55 MSD 2011


Am 09.05.2011 09:06, schrieb Cedric Jeanneret:
> On Mon, 9 May 2011 14:18:09 +0800
> Jeff Pang<jeffrpang at gmail.com>  wrote:
>
>> Hello,
>>
>> Since HTTPS doesn't support vhost, shall we have the need to put the
>> server_name command in the server section? for example,
>>
>>           server {
>>                  listen       443;
>>                  server_name  xxx.example.com;
>>                  ....
>>           }
>>
>> Thanks.
>>
>>
> o_O since when does HTTPS not support vhosts ?
>
> the only problem is when having multiple SSL vhosts on the same IP - the certificate has to cover all those vhosts.
>
> To answer your question, you shall provide:
> server_name $_;
>
> it's the default vhost
>
> Cheers,
>
> C.

Even this is not needed since nginx does support SNI.

http://en.wikipedia.org/wiki/Server_Name_Indication

Hope this helps a bit,

Pascal



More information about the nginx mailing list