Nginx Configuration Proxy_pass Forwarded/Path issues domestic private equity jiuding Holdings create app to send $20 cash pickup Address: http://jdb.jiudingcapital.com/phone.html Internal Invite code: C8E245J (do not write the invitation code, no cash to send) domestic private equity institutions jiuding Holdings, jiuding Investment is the national share transfer system listed public company, the stock code is 430719, As "China PE first share", the market value of over 100 billion yuan. --------------------------------------------------------------------------------------------------------------- ---------------------------------------------------nginx configuration Proxy_pass forwarded/path problem when configuring Proxy_pass in Nginx, if you are following^~ match path, pay attention to Proxy_pass URL after the last/, when added/, equivalent to the absolute root path, the Nginx will not be the location of the matching path part of the agent away;, the matching path portion is also given to the agent. Location^~/static_js/{Proxy_cache js_cache; Proxy_set_header Host js.test.com; Proxy_pass http://js.test.com/; }as the above configuration, if the requested URL is http://servername/static_js/test.html will be proxied as http://js.test.com/test.htmland if you configure location so^~/static_js/{Proxy_cache js_cache; Proxy_set_header Host js.test.com; Proxy_pass http://js.test.com; }will be proxied to http://js.test.com/static_js/test.htmOf course, we can use the following rewrite to achieve/the function location^~/static_js/{Proxy_cache js_cache; Proxy_set_header Host js.test.com; rewrite/static_js/(. +) $/$1 Break; Proxy_pass http://js.test.com; }
Nginx configuration Proxy_pass Forwarding/path problem