how nginx decide which server block to use
Francis Daly
francis at daoine.org
Wed Jun 21 21:57:44 UTC 2017
On Wed, Jun 21, 2017 at 03:26:10PM +0800, George / wrote:
Hi there,
For the question in the Subject: line, see
http://nginx.org/en/docs/http/request_processing.html#mixed_name_ip_based_servers
> i am running nginx version: nginx/1.12.0.i got following server block config as below, all request match regular expression work well,but request to server s01.example.com return 404.what's wrong? i googled for a while,most of the article said,it first try to match literal string ,then wildcard,and regular expression last.
>
When you make a request for s01.example.com, do you connect to [ip1],
[ip2], [ip3], or something else?
Which server{} do you think is being used? Which server do you want nginx to use?
For what it is worth, a config line like
try_files $uri $uri/ @apache =404;
will never try to use the @apache location.
Good luck with it,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list