Hosting Apache and WAMP Websites on Azure Cloud

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.

Configure Windows Firewall To Open Port 80 and 443

If IIS was installed previously, the existing port 80 and 443 rules might only be in effect for IIS. Delete them and create new rules for general port 80 and 443 use.

Check for any blocking rules automatically created for the Apache httpd.exe program, they will be named as such (Apache HTTP Server).

Every time you update/change Apache versions, the Windows Firewall will attempt to create a new blocking rule for it.

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).

Other

* 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).