# Odd server\_name directive behavior

**URL:** <https://www.ruby-forum.com/t/odd-server-name-directive-behavior/242956>\
**Category:** NGINX\
**Created:** [August 11, 2015, 12:14am UTC](https://www.ruby-forum.com/t/odd-server-name-directive-behavior/242956 "2015-08-11T00:14:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 11, 2015, 12:14am UTC](https://www.ruby-forum.com/t/odd-server-name-directive-behavior/242956/1 "2015-08-11T00:14:22Z")

</div>

I have an nginx 1.9.0 deploy and I noticed a working config where the  
name  
given to the server\_name directive doesn’t match the names in the Host  
headers or the certificate DNs. It looks like a mistake, but it works,  
and  
I don’t know why! Is it possible that if there is only one server stanza  
that nginx doesn’t bother comparing the name and just processes the  
request  
via the only stanza defined?

---

<div class="post-metadata">

**Author:** ![CJ\_Ess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c68b51/32.png) [@CJ\_Ess](https://www.ruby-forum.com/u/CJ_Ess)\
**Post date:** [August 11, 2015, 9:28am UTC](https://www.ruby-forum.com/t/odd-server-name-directive-behavior/242956/2 "2015-08-11T09:28:22Z")

</div>

On Monday 10 August 2015 18:13:53 CJ Ess wrote:

> I have an nginx 1.9.0 deploy and I noticed a working config where the name  
> given to the server\_name directive doesn’t match the names in the Host  
> headers or the certificate DNs. It looks like a mistake, but it works, and  
> I don’t know why! Is it possible that if there is only one server stanza  
> that nginx doesn’t bother comparing the name and just processes the request  
> via the only stanza defined?

> **[Server names](http://nginx.org/en/docs/http/server_names.html)**

> **[How nginx processes a request](http://nginx.org/en/docs/http/request_processing.html)**

wbr, Valentin V. Bartenev
