0
我們有一個紅寶石應用程序通過乘客+ nginx服務,像abc.xyz.com網址。 現在我們要點/重定向xyz.com到abc.xyz.com/client/page。 下面是試圖代碼Nginx重定向域到子域URL與持久性URL
server {
server_name xyz.com;
location/{
return 301 $scheme://abc.xyz.com/client/page;
}
}
但在瀏覽器URL它顯示abc.xyz.com/client/page。我們希望xyz.com。
是不是那個,nginx請求瀏覽器做什麼?而不是xyz.com從abc.xyz.com/client/page獲取數據 - 或者我沒有得到這個問題的重點?重定向是客戶要完成的行爲,對嗎? – Dilettant
@Dilettant是的,xyz.com應該從abc.xyz.com/client/page獲取數據。 – PrashantB
您需要一個反向代理而不是重定向。有關更多信息,請參見[本文檔](http://nginx.org/en/docs/http/ngx_http_proxy_module.html)。 –