Nginx Server : Desired Domain Name on Local Host

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


Hi,

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

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
test;*
and then I restarted nginx server.

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

Before moving to a real server I want to understand exactly how nginx gets
request
from desired domain name (example.com) 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,
www.chetanpatil.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120616/07d9b5fd/attachment.html>


More information about the nginx mailing list