<div dir="ltr"><div><div>> or to the first one in the configuration if there is no such</div><div>parameter.</div></div><div><br></div><div>As if all the server blocks are configured together? That sounds really strange to me, that one server block could be the default for another server block. </div>
<div><br></div><div># rgrep default_server /etc/nginx/</div><div>/etc/nginx/sites-available/<a href="http://strattonbrazil.com">strattonbrazil.com</a>: #listen [::]:80 default_server ipv6only=on;</div><div>/etc/nginx/sites-available/<a href="http://morebearsmore.com">morebearsmore.com</a>: #listen [::]:80 default_server ipv6only=on;</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 11:43 AM, Valentin V. Bartenev <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Monday 03 February 2014 11:21:06 Josh Stratton wrote:<br>
> How long is that cache kept?<br>
<br>
</div>It depends on browser if there were no cache-related headers in response.<br>
<div class="im"><br>
> If it redirected to the other one, will be redirect on my phone indefinitely?<br>
> I tried clearly my phone's settings and it still pulls up the other site's<br>
> page--the old page, too, as I've changed the words. Is nginx saying this<br>
> page is cacheable and thus not returning the new version because the browser<br>
> uses the old one?<br>
<br>
</div>By default nginx doesn't return any cache-related headers. If the browser has<br>
cached some page, it can show the page to user without requesting server.<br>
<div class="im"><br>
><br>
> > This article should shed the light:<br>
> > <a href="http://nginx.org/en/docs/http/server_names.html" target="_blank">http://nginx.org/en/docs/http/server_names.html</a><br>
><br>
> Thanks for the link. That seems pretty clear, but how is nginx deriving<br>
> the hostname? If I run `hostname` I get "home" back. I still don't<br>
> understand why it fell back to the other one.<br>
<br>
</div>If there is no server defined for a requested host, it falls back to that one<br>
with the "default_server" parameter in the listen directive for a specific<br>
address:port pair, or to the first one in the configuration if there is no such<br>
parameter.<br>
<div class="HOEnZb"><div class="h5"><br>
wbr, Valentin V. Bartenev<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>