Azure-Linux VM Apache Port Troubleshooting

Hi All,

In this Scenario we will cover how to Publish\Troubleshoot  a Linux apache Port to external users. (I assume you already installed apache)

  1. Make sure your binding is set to and not restricted to (by editing the httpd.conf) and verify by netstat -ntlp | grep 80  #port number you set your site.


  1. Make sure you have allowed an Iptables rule to allow incoming requested for the Port you had set
  2. If you are just testing disable Iptables to verify Site is working (For Ubuntu sudo ufw enable , For Centos/Redhat 6.x sudo service iptables stop ,For Centos/Redhat 7.x  systemctl disable firewalld
  3. If you site doesn't reside on the defult apache\apache2 locationplease check Selinux (getenforce command)

  1. you can temporary disable Selinux via the command  setenforce 0
  2. To disabled Selinux you can edit the files /etc/Selinux and set to disable (Centos/Redhat this required a reboot)
  3. On Ubuntu on Azure the package is not installed by default (selinux-utils)


  1. after you verify your site is running and security rules are set or disabled you can try to browse the site from another VM running in the same VNET (NSG should be allowing this Port Requests)
  2. Go to Azure Portal to your VM blade and navigate to the Network -- > NSG --> Open an allow rule to allow incoming traffic depend how you set your apache service.


  1. Browse from External or use wget or curl command to check the page status.


  1. You can always look at the syslog\messages logs for more information.
  2. Or use Fiddler to get a page status.


If this doesn't solve the Problem.

Feel free to raise a ticket for our Azure Support and we will help you out.

Thank You,

Tzachi Elkabatz