Share via


I Can't access to Web host in apache - Virtual Machine

Question

Friday, May 5, 2017 2:49 PM

Hi,

I've created a Ubuntu Vitual Machine and I've installed apache2 service. Then I put a simple website inside apache (www).

I want to access in my laptop to the website located in the Vitual Machine, i'm using the same IP I'm using to connect by SSH to my Virtual Machine but It doesn't work (example http//5.5.5.5.5)

Later, searching n this forum, I've created a security group wich two rules (inbound/outbound) allowing all traffic by all ports but It still doesn't work.

Maybe is firewall blocking conections?

What can i do?

Very thanks,

Luis. 

All replies (4)

Saturday, May 6, 2017 11:17 AM

  • Check in the NSG, so that port 80 is accessible from public internet?
  • Make sure that there is a Public IP?
  • May I know what exactly happens when you try access website?

This article will help you in this scenario.

Opening ports to a VM in Azure using the Azure portal

Note: Please note that the same rule will apply to all the VMs using the same NSG, which means you can reuse it for all your Web servers for example, while most likely choosing a different one for all your SQL machines. NSG allows inbound port 80

You can now connect directly to your VM using port 80 and the public IP provided in its Dashboard. Now you only need to allow the traffic through the VMs built-in firewall.

Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


Monday, May 8, 2017 4:41 PM

Hi!
Very thanks for answer.
These are my NSG rulers (inbouns entrys and outbound entrys also)

Source : any
Destiny: *
Allow

Source: Any
Destiny: 80
Allow

So I accept any connection by any ports. NSG is assigned to my group where is the virtual machine.
In this sesion,  to connect by SSH to my Virtual Machine is: [email protected]
Then I start apache service and go with my computer to http://13.92.134.177 (y algo tried with http and adding :80 port at the end of url).

Few seconds later my appear an error saying: 
Can not access this website
13.92.134.177 has taken too long to respond.

I tried to open ports in linux firewall with:

  • ufw enable http
  • ufw enable 80/tcp
    But it doesn't work.

I'm doing something wrong, but I don't get it.
Thank,
Luis.


Wednesday, May 10, 2017 6:43 AM

Some help anybody please?

Thanks


Wednesday, May 10, 2017 2:43 PM

Try to use the second rule and delete the rule that says destination and let us know if you need future assistance.