简体   繁体   English

将 DNS 映射到 Azure VM

[英]Mapping DNS to Azure VM

I have a ASP.NET website hosted at a hosting provider (Windows Server 2012 IIS 8) which is down most of the time.我有一个托管在托管服务提供商(Windows Server 2012 IIS 8)上的 ASP.NET 网站,该网站大部分时间都处于关闭状态。 I have my domain name registered through them which I do not intend moving as of now.我已经通过他们注册了我的域名,目前我不打算移动。

I am moving my hosting to Azure VM.我正在将我的主机迁移到 Azure VM。 Here's what I have already done.这是我已经完成的。

  • Created virtual machine in Azure with static IP.使用静态 IP 在 Azure 中创建虚拟机。
  • Created a DNS called red-seau-cloudapp-azure.创建了一个名为 red-seau-cloudapp-azure 的 DNS。
  • Added endpoint on public port 80. So Website can be accessed via localhost and via http:// ipaddress/ (outside of VM)在公共端口 80 上添加了端点。因此可以通过 localhost 和 http:// ipaddress/(VM 外部)访问网站

On my existing hosting provider, I see the following DNS entries.在我现有的托管服务提供商上,我看到以下 DNS 条目。

NS ns1.myhost.arvixevps.com    
NS ns2.myhost.arvixevps.com    
A < ipaddress >    
* A < ipaddress >    
www A < ipaddress >    
mail A < ipaddress >    
mail2 A < ipaddress >    
MX [10], mail.mywebsite.com    
MX [21], mail2.mywebsite.com    
TXT globalsign-domain-verification=SKFHKSJHDLKUERIJKDCFJLKF_234KJFDJK

Q1.一季度。 What do I need change in these entries so that www.mywebsite.com points to the website hosted on Azure VM instead of my old hosting?我需要对这些条目进行哪些更改,以便 www.mywebsite.com 指向 Azure VM 上托管的网站,而不是我的旧托管?

Q2. Q2。 Is it possible that I keep my mail server on my old hosting and move only my website to point to Azure VM?是否可以将邮件服务器保留在旧主机上并仅将我的网站移至指向 Azure VM?

Q1.一季度。 What do I need change in these entries so that www.mywebsite.com points to the website hosted on Azure VM instead of my old hosting?我需要对这些条目进行哪些更改,以便 www.mywebsite.com 指向 Azure VM 上托管的网站,而不是我的旧托管?

You would need to change the A record to point to the IP address of your new Virtual Machine in Azure.您需要将A记录更改为指向 Azure 中新虚拟机的 IP 地址。 However for this, you would need to ensure that the IP address of your Virtual Machine does not change which would cost more.但是,为此,您需要确保虚拟机的 IP 地址不会更改,这会增加成本。 Another alternative is to use CNAME mapping where you map your domain to the DNS name of your Azure Virtual Machine.另一种替代方法是使用CNAME映射,将域映射到 Azure 虚拟机的 DNS 名称。 You may find this link helpful: https://azure.microsoft.com/en-us/documentation/articles/cloud-services-custom-domain-name-portal/ (see the instructions for Azure Portal and not Azure Classic Portal there).您可能会发现此链接很有帮助: https : //azure.microsoft.com/en-us/documentation/articles/cloud-services-custom-domain-name-portal/ (请参阅 Azure 门户而非 Azure 经典门户的说明) )。

Q2. Q2。 Is it possible that I keep my mail server on my old hosting and move only my website to point to Azure VM?是否可以将邮件服务器保留在旧主机上并仅将我的网站移至指向 Azure VM?

Yes, it is entirely possible to do so.是的,完全有可能这样做。 Only change the DNS records that you want (A, CNAME etc.) and leave the MX records unchanged.只更改您想要的 DNS 记录(A、CNAME 等)并保持 MX 记录不变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM