我正在使用Debian和apache2,我不知道是否有可能使用apache將代理從一個域逆向轉換到另一個域,但後端服務器後面的後端服務器仍然認爲請求的URL是後者?如何設置Apache 2反向代理轉發不同的域名並假裝爲該域名?
例如,如果您訪問https://www.example.com/index.html,將請求轉發給https://www.example.org/index.html,但在www.example.org的後端服務器仍認爲請求URL是https://www.example.org/index.html,不https://www.example.com/index.html
我想我需要改變X-Forwarded-Server頭在Apache代理中,但我不知道如何。任何幫助將不勝感激。
謝謝。我再次測試,結果如下:Host = example.org,X-Forwarded-Host = example.com,X-Forwarded-Server = example.com – Ryan