Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hosting website on Azure Virtual Machine

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?

like image 581
Rob Bowman Avatar asked Jun 28 '13 15:06

Rob Bowman


People also ask

Can you host a website on Azure Virtual Machine?

If your web hosting requirements aren't directly supported by the Azure Web app platform, you can leverage virtual machines to customize and control every aspect of the web server.

Can you host a website on a VM?

However, many businesses need greater control of the web server hosting their sites when they move to Azure. Such businesses can leverage Azure virtual machines (VM) to host their websites and web apps.

Is Azure good for Web hosting?

Microsoft Azure is a solid and reliable choice for hosting large websites and applications, and pay-as-you-go pricing ensures you aren't overcharged. However, tech support is costly on a monthly subscription.

Is it free to host a website on Azure?

Host your website on Azure Static Web Apps for free.


1 Answers

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.

like image 128
Fernando Correia Avatar answered Oct 18 '22 15:10

Fernando Correia