Welcome! Log In Create A New Profile

Advanced

Re: how nginx decide which server block to use

Francis Daly
June 21, 2017 05:58PM
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@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how nginx decide which server block to use

George / June 21, 2017 03:28AM

Re: how nginx decide which server block to use

Francis Daly June 21, 2017 05:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 178
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready