server blocks configured, but getting "hello world" of nginx

Valentin V. Bartenev vbart at nginx.com
Mon Feb 3 19:43:36 UTC 2014


On Monday 03 February 2014 11:21:06 Josh Stratton wrote:
> How long is that cache kept? 

It depends on browser if there were no cache-related headers in response.

> If it redirected to the other one, will be redirect on my phone indefinitely?  
> I tried clearly my phone's settings and it still pulls up the other site's
> page--the old page, too, as I've changed the words.  Is nginx saying this
> page is cacheable and thus not returning the new version because the browser
> uses the old one?

By default nginx doesn't return any cache-related headers.  If the browser has 
cached some page, it can show the page to user without requesting server.

> 
> > This article should shed the light:
> > http://nginx.org/en/docs/http/server_names.html
> 
> Thanks for the link.  That seems pretty clear, but how is nginx deriving
> the hostname?  If I run `hostname` I get "home" back.  I still don't
> understand why it fell back to the other one.

If there is no server defined for a requested host, it falls back to that one 
with the "default_server" parameter in the listen directive for a specific
address:port pair, or to the first one in the configuration if there is no such
parameter.

   wbr, Valentin V. Bartenev



More information about the nginx mailing list