簡體   English   中英

將來自不同主機的多個IP地址指向具有不同端口的同一域名

[英]Pointing multiple IP address from different hosts to a same domain name with different port

我嘗試使用彈性IP地址創建Amazon EC2實例。 在這里,我部署了Bitnami的MEAN應用程序。

另一方面,我們有一個CPanel(不是在亞馬遜上部署的,我認為它是Apache,不確定,我不是部署它的人)

Cpanel已經指向www.example.com,因此我們可以通過www.example.com:2082訪問cpanel,但默認的www.example.com:80為空白/空。 我們將Cpanel用於我們的郵件服務器。

我需要做的是將Amazon EC2公共IP和DNS指向www.example.com:80。 我可以在“ Cpanel DNS區域編輯器”中進行設置嗎? 還是需要設置Amazon Route 53? 我需要什么?

如果在Amazon的Cpanel DNS區域編輯器中創建新的A記錄,則無法訪問Cpanel www.example.com:2082。 我現在真的很困惑。 請幫忙。

為此,您需要引入一個代理服務器。由於在DNS中,您無法設置端口,因為每種類型的請求都已經定義了端口。 您可以添加nginx或haproxy或任何其他反向代理服務器,它們將接受所有請求並將請求傳遞給適當端口上的適當主機。

我知道已經有點晚了,但是以防萬一您仍然需要它或有人遇到這個問題:

無需代理。

You point the A record for example.com to EC2 IP.
CNAME for WWW to example.com
Then you should have an A record for mail.example.com for your cPanel IP
Your MX records should point to mail.example.com and not to example.com.
And you can access cPanel at mail.example.com:2082 or whatever the server's IP or main hostname is. The main hostname has the advantage that you can use port 2083 for SSL cPanel connections
Just make sure the e-mail clients use mail.example.com and not example.com as the connecting mail server.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM