Nginx Server : Desired Domain Name on Local Host

Chetan Patil chtpatil at
Sat Jun 16 13:08:53 UTC 2012


I'm on Fedora 16 with nginx installed using yum.

1) /etc/nginx/conf.d    contains : default.conf  ssl.conf  virtual.conf
2) /etc/init.d/                contains : nginx  (to start,stop etc server)
3) /usr/share/nginx     contains the default html files.
4) /etc/nginx/nginx.conf contaings main config file which is calling

I am trying to understand how nginx will receive desired domain request and
how it
will display the html pages.

For that I edited /etc/nginx/conf.d/default.conf and wrote *server_name
and then I restarted nginx server.

In browser when I type : test:80 , it shows webpage not available, instead
showing nginx default test page.

Before moving to a real server I want to understand exactly how nginx gets
from desired domain name ( and then shows the relevant data.

I have understood the concept of fetching files from proper folder as per
the configuration file,
but not able to set desired domain name as a test on localhost.

May anyone let me know what would be the correct configuration ?

Thank You and Warm Regards,

Chetan Arvind Patil,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list