大网数据广告活动
服务器运维问答

Azure Virtual Machine can't serve websites

· 52CE 我爱测

I am unable to get an Azure VM running Windows Server 2012 to serve up the IIS default website from it's public static IP. Created a VM running Win Server 2012 R2 and installed web server role. Browse to localhost and can see the…

问题原文

原帖链接 · George Filippakos · CC BY-SA 3.0

I am unable to get an Azure VM running Windows Server 2012 to serve up the IIS default website from it's public static IP.

  1. Created a VM running Win Server 2012 R2 and installed web server role.

  2. Browse to localhost and can see the default website is working

  3. In Azure, configured the VM to have a Public Static IP address and added DNS name to azure which is publicly resolving to the static IP.

  4. In Azure, configured a Security Group for the VM network interface and added the following rules:

    allow-http    source: any    source port: 80    dest: any    dest port: 80    service: tcp/80    action: allow
    allow-https    source: any    source port: 80    dest: any    dest port: 80    service: tcp/443    action: allow
    
  5. In Windows Firewall settings, made sure the rules to allow HTTP and HTTPS traffic are enabled. (I have also tried disabling the firewall entirely).

  6. In IIS make sure the default website is bound to any IP address.

When I try to connect to the VM static IP address, e.g.: http://MY.PUBLIC.STATIC.IP, I cant connect at all. I can't PING the server either.

Any ideas on what I am doing wrong?

已采纳解答

原帖链接 · George Filippakos · CC BY-SA 3.0

You are limiting incoming connection to port 80 only. Client browsers can use a port number ranging from 1024 and 65536 for their outgoing connection.

You need to change your security group settings to allow incoming connections from Any port:

allow-http    source: any    source port: any    dest: any    dest port: 80    service: tcp/80    action: allow
allow-https    source: any    source port: any    dest: any    dest port: 80    service: tcp/443    action: allow

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。