Nginx learning - examples: location + proxy_pass configuration left slash thorough understanding

Online a lot of location, proxy_pass description of the left slash, concluded that the parrot, a variety of both, in order to completely understand this problem and decided to come to the law by comparing the test

Here to explain: Left slash /, is also considered to be a string

Here is my test results

Conclusions show: forwarding the results and whether to include location / nothing to do, and whether proxy_pass / no absolute relationship, said here absolutely, is to say, / for proxy_pass, it's just a string, and a, b, c nothing the difference

We use string instructions:

It is assumed to be matched path = location + path1

First, there must forward the results of all the strings proxy_pass

Secondly proxy_pass remove ip, after the port, if

A character string, forwarding result = proxy_pass + path1

No string, forwarding result = proxy_pass + path1

Guess you like

Origin www.cnblogs.com/yb38156/p/12173626.html