Hosting Apache and WAMP Websites on Azure Cloud

Posted: 2014-06-04 21:04:43

After installing Apache, or a WAMP server such as WampDeveloper Pro, in a Windows VM on Azure Cloud, you’ll need to connect that VM to port 80 and also open internet access to Apache.

Create Endpoints for Port 80 and 443

Azure needs to have its “port endpoints” set up to be able to forward incoming port 80 and 443 traffic to the right VM (and the right port in the VM).

Create new endpoints from Public:80 to Private:80 (and the same for port 443). Don’t select/check-mark ‘Create load-balancing set’, nor ‘Enable direct server return’, unless you are running multiple VMs and want the traffic to be split between them for these ports.

Virtual Machine > Endpoint > Add endpoint > Next > name:http, protocol:tcp, public port:80, private port:80 > click Complete

How to Set Up Endpoints to a Virtual Machine

Configure Windows Firewall To Open Port 80 and 443

Windows Firewall blocks, by default, incoming port 80 (HTTP) and 443 (HTTPS) requests, for Protocol TCP and UDP. You’ll need to create Inbound Rules to open these ports.

Note that:

Clear Access Control List Rules

Select port 80 and 443 Endpoints and click ‘Manage ACL’. Delete any rules present (you do not need them for a publicly accessible website).


* It might take 10 minutes for endpoint changes to take effect in the system.

* Before installing or running Apache on Azure, make sure that IIS is uninstalled, or at least that its Service is stopped and its Startup Type changed from “Automatic” to “Manual” or “Disabled”. Apache and IIS are both configured (by default) to bind-to/listen-on ports 80 and 443 on all IPs, and unless they are bound to different IPs or on different ports, they will not be able to run at the same time (side-by-side).