我為此苦了一段時間,肯定做錯了什么。我在同一臺機器上有apache服務器和JBoss服務器。我想將mydomain.com的流量重定向到JBoss localhost:8080 / example。當前為mydomain.com設置了DNS,輸入瀏覽器后它將直接進入端口80。我的問題是,當某個域名進入apache(在本例中為“ mydomain.com”)時,如何重定向到另一個端口?<VirtualHost ip.addr.is.here> ProxyPreserveHost On ProxyRequests Off ServerName mydomain.com ProxyPass http://mydomain.com http://localhost:8080/example ProxyPassReverse http://mydomain.com http://localhost:8080/example</VirtualHost> 帶有建議的更新 -仍未轉發到端口8080<VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ServerName mydomain.com ServerAlias www.mydomain.com ProxyPass http://mydomain.com http://localhost:8080/example ProxyPassReverse http://mydomain.com http://localhost:8080/example</VirtualHost>
添加回答
舉報
0/150
提交
取消