# Server\_name for https

**URL:** <https://www.ruby-forum.com/t/server-name-for-https/206748>\
**Category:** NGINX\
**Created:** [May 9, 2011, 8:18am UTC](https://www.ruby-forum.com/t/server-name-for-https/206748 "2011-05-09T08:18:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [May 9, 2011, 8:18am UTC](https://www.ruby-forum.com/t/server-name-for-https/206748/1 "2011-05-09T08:18:57Z")

</div>

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.

–  
Jeff P.  
[www.DNSbed.com](http://www.DNSbed.com)

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 9, 2011, 9:07am UTC](https://www.ruby-forum.com/t/server-name-for-https/206748/2 "2011-05-09T09:07:08Z")

</div>

On Mon, 9 May 2011 14:18:09 +0800  
Jeff P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 9, 2011, 9:39am UTC](https://www.ruby-forum.com/t/server-name-for-https/206748/3 "2011-05-09T09:39:52Z")

</div>

2011/5/9 Cedric J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > ```
> > server_name xxx.example.com;
> > 
> > ```
> 
> To answer your question, you shall provide:  
> server\_name $\_;
> 
> it’s the default vhost

OK That’s right thanks.  
I have misunderstood the SSL Proxy maybe, now I got it.

–  
Jeff P.

> **[403 Forbidden](http://www.dnsbed.com)**

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 9, 2011, 11:49am UTC](https://www.ruby-forum.com/t/server-name-for-https/206748/4 "2011-05-09T11:49:46Z")

</div>

Am 09.05.2011 09:06, schrieb Cedric J.:

> > ```
> > server_name xxx.example.com;
> > 
> > ```
> 
> 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.

> **[Server Name Indication](https://en.wikipedia.org/wiki/Server_Name_Indication)**
>
> Server Name Indication (SNI) is an extension to Transport Layer Security (TLS) where a client indicates which hostname it is attempting to connect to at the start of the handshaking process. The extension allows a server to present one of multiple possible certificates on the same IP address and port number, allowing for multiple services (including HTTPS websites) to be served by the same IP address without using a single certificate. For HTTPS, it is the conceptual equivalent to HTTP/1.1 vi Pr...

Hope this helps a bit,

Pascal

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 11, 2011, 12:06pm UTC](https://www.ruby-forum.com/t/server-name-for-https/206748/5 "2011-05-11T12:06:54Z")

</div>

On Mon, May 09, 2011 at 09:06:27AM +0200, Cedric J. wrote:

> > ```
> > server_name xxx.example.com;
> > 
> > ```
> 
> To answer your question, you shall provide:  
> server\_name $\_;
> 
> it’s the default vhost

This is not default virtual host. Please read this:

> **[Server names](http://nginx.org/en/docs/http/server_names.html#miscellaneous_names)**
>
> Server names are defined using the server\_name directive and determine which server block is used for a given request. See also “How nginx processes a request”. They may be defined using exact names, wildcard names, or regular expressions:

–  
Igor S.

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 11, 2011, 12:17pm UTC](https://www.ruby-forum.com/t/server-name-for-https/206748/6 "2011-05-11T12:17:22Z")

</div>

On Wed, 11 May 2011 14:06:16 +0400  
Igor S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > ```
> > > listen 443;
> > > 
> > > ```
> > 
> > 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
> 
> This is not default virtual host. Please read this:  
> [Server names](http://nginx.org/en/docs/http/server_names.html#miscellaneous_names)

Woops, indeed - sorry 😕 (never used this syntax in my installation… )

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 11, 2011, 12:07pm UTC](https://www.ruby-forum.com/t/server-name-for-https/206748/7 "2011-05-11T12:07:31Z")

</div>

On Mon, May 09, 2011 at 02:18:09PM +0800, Jeff P. wrote:

> Thanks.

server should always have a name. Or it will be “” by default.

–  
Igor S.
