Windows – cannot access site hosted at nginx in windows server using public ip, but able to access using private ip

azurehttpnginxwindows

I created a site in Windows Azure Virtual Machine, nginx is running in VM at port 80. im able to access the site using localhost and private ip address 10.0.0.4:80. but when i try to access using public ip 13.x.x.x im not able to see my website.

I had added the port 80 in Inbound security rule in windows azure, and source port range is also * .

Best Answer

In Azure, there are three ways to block network traffic, so we should check them:

  1. OS firewall, we should check windows firewall settings, make sure those ports have add in the inbound rules.

  2. NSG/endpoints. If you VM in ARM module, we should add those ports to VM's NSG inbound rules. If you VM in ASM module, we should add those ports to VM's endpoints settings.
    About how to add ports to NSG, please refer to this link.
    About how to add ports to endpoints, please refer to this link.

  3. Vnet's subnets' security group. we can check in azure new portal. enter image description here

Please check those settings.

Related Topic