Jeyakumar
Jeyakumar

Reputation: 1

How to open Azure website in local machine?

I have hosted my website on an Azure virtual machine. I can open my website on that virtual machine without any issues, but I cannot open the same website on my laptop. What is the reason for this?

I have created New rules in Network Security Group to allow port 80 and 443. But still, it's not working.

Upvotes: 0

Views: 166

Answers (1)

Imran
Imran

Reputation: 5530

Hosted sample IIS website on an Azure virtual machine I got the same error like below:

enter image description here

This error usually occurs, in virtual machine network security group not associated with your virtual machine to allows inbound traffic on ports 80 and 443.

Added ports 80 and 443 in my virtual machine.

enter image description here

When I added port, I got result successfully like below:

![enter image description here](https://i.imgur.com/gceZy9i.png)

In your case as you added port 80 and 443 ensure that the firewall on your Azure VM is not blocking incoming traffic on ports 80 and 443.

Open the Windows Defender Firewall with Advanced Security application -> inbound port rule, right click add new rule with port like below:

enter image description here

Make sure to check port is allowing on your vm using Telnet

Telnet <ipadress> 80

enter image description here

Ensure that your web server running on the Azure VM is correctly configured to listen on port 80 like below:

enter image description here

If you are unable to access the application which is hosted in vm try to access in another network or location

Upvotes: 0

Related Questions