111.Nginx之upstream和proxy模塊使用
https://www.cnblogs.com/feng0919/p/11968257.html
3.無法確定請求URI中要替換的部分
location /name/ {
proxy_pass http://127.0.0.1$request_uri;
}
在這種情況下,如果在指令中指定了URI,它將照原樣傳遞到服務器,從而替換原始請求URI。
222.nginx中,$request_uri和$uri的區別
https://www.cnblogs.com/gaoyuechen/p/9040191.html
This variable is equal to the *original* request URI as received from the client including the args. It cannot be modified. Look at $uri for the post-rewrite/altered URI. Does not include host name. Example: "/foo/bar.php?arg=baz"
這個變量等於從客戶端發送來的原生請求URI,包括參數。它不可以進行修改。$uri變量反映的是重寫後/改變的URI。不包括主機名。例如:"/foo/bar.php?arg=baz"
This variable is the current request URI, without any arguments (see $args for those). This variable will reflect any modifications done so far by internal redirects or the index module. Note this may be different from $request_uri, as $request_uri is what was originally sent by the browser before any such modifications. Does not include the protocol or host name. Example: /foo/bar.html
這個變量指當前的請求URI,不包括任何參數(見$args)。這個變量反映任何內部重定向或index模塊所做的修改。注意,這和$request_uri不同,因$request_uri是瀏覽器發起的不做任何修改的原生URI。不包括協議及主機名。例如:"/foo/bar.html"
$document_uri
The same as $uri.
同$uri.
333.nginx 之 proxy_pass詳解