# Problem with subdomain in localhost

**URL:** <https://www.ruby-forum.com/t/problem-with-subdomain-in-localhost/236088>\
**Category:** NGINX\
**Created:** [August 4, 2013, 10:22pm UTC](https://www.ruby-forum.com/t/problem-with-subdomain-in-localhost/236088 "2013-08-04T22:22:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [August 4, 2013, 10:22pm UTC](https://www.ruby-forum.com/t/problem-with-subdomain-in-localhost/236088/1 "2013-08-04T22:22:19Z")

</div>

Hello! I am trying to create subdomains in my localhost. I want for  
instance  
2 domains, fil.localhost and test.localhost that point to 2 different  
locations. Although I have managed to accomplish that there is a problem  
with my localhost: it points to a location too (actually in  
fil.localhost)  
and I can’t find out why.  
Here is the configuration of the fil.localhost

> **[mysite.conf - Pastebin.com](https://pastebin.com/TKt37aNz)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

(test.localhost is exactly the same except that istead of fil.localhost  
in  
server\_name, it has test.localhost)  
Also, here [hosts - Pastebin.com](http://pastebin.com/TUZmLwiw) is my /etc/hosts list.  
I haven’t touched nginx.conf or any other file.  
Any suggestions are really welcomed 😃

Posted at Nginx Forum:

> **[Problem with subdomain in localhost.](https://forum.nginx.org/read.php?2,241554,241554#msg-241554)**
>
> Hello! I am trying to create subdomains in my localhost. I want for instance 2 domains, fil.localhost and test.localhost that point to 2 different locations. Although I have managed to accomplish that there is a problem with my localhost: it points...

---

<div class="post-metadata">

**Author:** ![vasilakisfil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vasilakisfil](https://www.ruby-forum.com/u/vasilakisfil)\
**Post date:** [August 4, 2013, 10:37pm UTC](https://www.ruby-forum.com/t/problem-with-subdomain-in-localhost/236088/2 "2013-08-04T22:37:31Z")

</div>

The question is: How does Nginx process a request made with an unknown  
hostname?

## The answer is: [How nginx processes a request](http://nginx.org/en/docs/http/request_processing.html)

_B. R._
