Cannot connect to the VM localhost

QBIM Admin 6 Reputation points
2021-08-12T13:05:53.907+00:00

Hi,

I have an url, http://localhost/<page_name>, that I can access when connected to the virtual machine. In addition, I need to be able to access this remotely from my laptop.

I have tried both connecting by replacing 'localhost' with both the dns string as well as the public i.p. address but both results in error that website cannot be reached.

I have created an inbound rule for the corresponding network security group and opened port 80 for HTTP service but still receiving the same error. When trying to do a test connection to the virtual machine's inbound connections using Connection source = Any Ip address and Service = HTTP I receive "Network connectivity allowed".

Any suggestion on how to solve this?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Estrella Sicardi 0 Reputation points
    2024-02-11T14:18:56.7133333+00:00

    I was trying to use the lab for the Cosmos DB learning and I got this problem to, when trying to connect to azure in the VM:
    User's image

    I tried refreshing and also checked my connection and firewall, but I couldn't fix it.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.