The nginx upstream configuration do not distinguish domain

Maxim Dounin mdounin at mdounin.ru
Mon Aug 10 12:13:31 UTC 2020


Hello!

On Mon, Aug 10, 2020 at 04:19:52AM -0400, mark_liao wrote:

> Hi, Dear friends:
> 
>     I post my problem detail in there:
> 
>    
> https://stackoverflow.com/questions/63239923/the-nginx-upstream-configuration-do-not-distinguish-domain
> 
>     why can not differentiate the two upstreams? 
>     Please take a look at this.

In your nginx configuration, there is no difference for the two 
server blocks configured except the uptream servers they proxy 
all requests to.

On the other hand, you claim that you've started two upstream 
servers:

"then I started the localhost:3003 and localhost:3002, each prefer 
to /www/wwwroot/www.demo1.com and /www/wwwroot/www.demo1.com."

Given the "prefer to" paths (whatever it means), both upstream 
servers seems to use the same configuration and expected to return 
identical responses.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list