Dev-7973 avatar image
0 Votes"
Dev-7973 asked vipullag-MSFT commented

80 port of apache not working on Azure VM

Apache is not accessible on Ubuntu based Azure VM on 80 port despite allowing it in NSG:


It is allowed in Ubuntu too:


Hitting the public IP keeps loading the page and it times out after some time.

image.png (69.5 KiB)
image.png (48.5 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Thanks for reaching out on Microsoft Q&A Platform.

Can you please use this link to check if the port 80 is open on Public IP.

If this is closed, then please check if there is any other NSG impacting that VM on the subnet level.

If this is open, then try to restart the apache service and check once if the page is reachable.
Also, try to see if the apache page is reachable from any other VM in the same subnet, this will help to see if any other restrictions are causing the problem when you try from outside the VNET.

0 Votes 0 ·


Any update on the issue?

0 Votes 0 ·

Hi vipullag-MSFT,

Thanks for keeping in touch and getting update on our status.
I am from same team as Dev-7973.

After your last message we changed to 80 in apache2/ports.config file. and everything started running smoothly.
Then we needed to increase the size of vm and we did increased. but now again our port 80 is showing closed on your provided link.
On our ubuntu 20 server everything seems fine as all the status commands we have checked are showing ok status.

Below are the details of netstat -ntlp command.

 Active Internet connections (only servers)
 Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
 tcp        0      0*               LISTEN      909/mysqld
 tcp        0      0*               LISTEN      909/mysqld
 tcp        0      0 *               LISTEN      751/systemd-resolve
 tcp        0      0    *               LISTEN      902/sshd: /usr/sbin
 tcp6       0      0 :::80                   :::*                    LISTEN      19540/apache2
 tcp6       0      0 :::22                   :::*                    LISTEN      902/sshd: /usr/sbin

Now no matter what changes i am making port is showing closed on the link but all statuses are ok.
let me know what else can i do.

as per my findings the apache on ubuntu serve is not even being hit right now.

0 Votes 0 ·


Thanks for responding back on this with more details.

If your Public IP on port 80 is showing closed when you check with on this link then the VM port is closed from where you are trying to reach it.

Can you please confirm you are able to access the apache server from a VM inside the same subnet?
Can you check if there are no more NSG's impacting the Subnet in which the VM is deployed?
Are you behind any corp network? Are you able to reach if you are within corp Network?

0 Votes 0 ·

0 Answers