10

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?

Rob Bowman
  • 7,632
  • 22
  • 93
  • 200
  • What error is happening? Is it a "page not found" or "can't find server error"? – Fernando Correia Jun 28 '13 at 19:01
  • I get the following response when requesting via Fiddler:[Fiddler] The socket connection to teamsitepoc.cloudapp.net failed.
    ErrorCode: 10060.
    A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
    – Rob Bowman Jun 28 '13 at 19:21
  • This tutorial helped me to host website on Azure https://www.youtube.com/watch?v=5qqTS2oBHDw – Luzan Baral Sep 13 '16 at 04:18

2 Answers2

12

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.

Fernando Correia
  • 21,803
  • 13
  • 83
  • 116
  • Thanks for your advice Fernando but I'm afraid I still get the same problem. The URL I'm using from my desktop PC (and a colleagues from their home network) is teamsitepoc.cloudapp.net. I can't see anything of value in the IIS logs or anything from eventvwr. Azure websites is not an for what I need the VM for. – Rob Bowman Jun 28 '13 at 21:54
  • I see you updated your question to add that you're running the Apache web server. Given you have configured the endpoint in Azure and the inbound firewall rule in Windows, it is probably a misconfiguration in Apache, either in the virtual host or the binding. I'll try to help you there. Please update your answer with relevant portions of your httpd.conf and other Apache configuration files. Also, are you using Virtual Hosts? – Fernando Correia Jun 29 '13 at 13:54
  • 1
    I hope to look into the Apache config on Tuesday. As a test (to prove all was good when using IIS), I created a simple "hello world" website in IIS bound to port 82 and added an azure endpoint for port 82. I can also browse to this locally (http://localhost:82/) but not from an external machine ( http://teamsitepoc.cloudapp.net:82/). It may be helpful if there were some kind of log at the Azure load balancer / switch level I could check to discover what it's doing with the failed requests? – Rob Bowman Jun 30 '13 at 08:32
  • 1
    Just to check, you also opened inbound TCP port 82 in the Windows firewall, right? And the IIS website has to be bound to the interface (Address *). – Fernando Correia Jun 30 '13 at 16:51
  • 1
    Doh! I forgot to open the firewall for Port82. Thanks very much - I have now proved the problem is caused by the apache config, not Azure. – Rob Bowman Jul 01 '13 at 07:50
3

You will need to create an endpoint on port 80 thru Windows Azure Management portal as well. This endpoint opens a port in the Windows Azure Load-balancer. Navigate to your VM within the portal and create a new Endpoint under the Endpoints screen of VM configuration within Azure management portal.

Igorek
  • 15,716
  • 3
  • 54
  • 92