Hosting website on Azure Virtual Machine

Rob Bowman picture Rob Bowman · Jun 28, 2013 · Viewed 18.3k times · Source

Yesterday I created an Azure Virtual Machine using the simple Win2008r2 + SQL2008r2 image.

I have deployed a website to the VM via an RDP session.

I am able to browse the website locally (via RDP) using

"http://localhost"

I understand that I need to add an Azure endpoint for port 80 to enable me to browse to the site from an external machine.

enter image description here

I have configured the Windows Firewall on the Azure VM to allow traffic on Port 80 inbound and outbound.

Could anyone please advise what I've missed or what I can do to troubleshoot?

---Update-----

I have learned a little more this morning. The website that I'm trying to host on the VM is an installation of Interwoven Teamsite v7.3.x. When I looked in IIS I could see that the "Default Web Site" was stopped. Another website called "TeamSiteSitePubPreview" had been created but was only bound to port 81.

So, what was presenting the website I could see when I browsed to

http://localhost locally?

I ran netstat -ano and this showed me that PID 1604 what listening on port 80. I then ran Process Explorer which told me that PID 1604 was allocated to "Appache HTTP Server".

I know nothing about About Appache, can anyone tell me if there's some Apache config that will be preventing connections from outside of the local server?

Answer

Fernando Correia picture Fernando Correia · Jun 28, 2013

For reference, I just tested this sequence and it gives you a website accessible over the Internet:

  • Create a new Windows Azure virtual machine with the Windows Server 2008 R2 SP1 image.
  • Add an endpoint on public port 80, private port 80.
  • While the endpoint is being created, start setting the server up.
  • Remote Desktop in.
  • Add the Web Server (IIS) role with default settings.
  • Test the connection. You should get a HTTP 200 OK status.

If you want to troubleshoot your server, start checking for errors in the event log. Check also the website bindings in IIS (Port 80, IP Address *).

Also consider the connection issue might be on the client (your) side. For instance, DNS caching. Try connecting from another machine with direct Internet connection (such as another cloud server) or from a service such as isup.me.

Additionally, if all you want is to host websites in IIS, the Web Sites service has a more streamlined experience.