简体   繁体   English

Azure VM上的网站设置

[英]Website Setup On Azure VM

I've been running the free trial and am trying to point of my name cheap domain to the vm web site I have created. 我一直在运行免费试用版,并试图将我的名字便宜的域名指向我创建的vm网站。

在此处输入图片说明

I covered the server Ip. 我涵盖了服务器IP。

Here are my namecheap settings for the domain. 这是我的域名便宜设置。 The covered Ip is the same as above.. 覆盖的Ip与上面的相同。 在此处输入图片说明 Here are my IIS settings 这是我的IIS设置 在此处输入图片说明 Change the Hostname to my actual domain. 将主机名更改为我的实际域。

I've also disabled Windows firewall and added port 80 and 443 in the security app hooked to the Azure VM. 我还禁用了Windows防火墙,并在安全应用程序中添加了连接到Azure VM的端口80和443。 I can't seem to connect to the website at all. 我似乎根本无法连接到该网站。 Am I missing something? 我想念什么吗? I've been troubleshooting for hours and cant find anything except basic tutorials and how to do it on the Classic Azure portal. 我已经进行了数小时的故障排除,除了基本教程以及如何在Classic Azure门户上进行操作之外,找不到任何内容。

thank you. 谢谢。

If you are using V1 (old portal/classic) Azure VM resources, then you need to open up the endpoint on the cloud services. 如果您使用的是V1(旧门户/经典门户)Azure VM资源,则需要在云服务上打开终结点。 All VMs exist as part of a Cloud Service. 所有VM均作为Cloud Service的一部分存在。
From the new portal, 在新门户中,

  • Select the VM (Classic) 选择虚拟机(经典)
  • Settings 设置
  • Endpoints 端点
  • Add the required port (make sure public port is the one you want to use, say 80, and the internal port is the one IIS is listening for) 添加所需的端口(确保公用端口是您要使用的端口,例如80,内部端口是IIS正在侦听的端口)

If you are using V2 resources, you need to add a public IP to your VM before it can be reached from the outside world. 如果您使用的是V2资源,则需要先将一个公共IP添加到您的VM中,然后才能从外界获得它。

From the new portal 从新门户

  • Click on the VM 点击虚拟机
  • Open settings 打开设置
  • Select Network Interfaces 选择网络接口
  • Select IP Address 选择IP地址
  • Enable public IP (and add a PIP) 启用公共IP(并添加一个PIP)

Keep in mind that in Azure, all IPs are dynamic. 请记住,在Azure中,所有IP都是动态的。 You will want to configure DNS settings against the DNS names provided, and not the IP address (as this will change if you power off the machine). 您将要根据提供的DNS名称而不是IP地址来配置DNS设置(如果关闭计算机电源,这将发生变化)。 For V1, use the cloud service name. 对于V1,请使用云服务名称。 For V2, you are given the option when creating the PIP to have azure assign a DNS name. 对于V2,在创建PIP时可以选择让azure分配DNS名称。

For testing, try to telnet on port 80 to the correct DNS name. 为了进行测试,请尝试通过端口80 telnet到正确的DNS名称。

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

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