I can not access localhost on other devices on my router - apache

Good morning,
Today I tried to set up a Apache 2 server on Ubuntu 18.4 LTS, and yet while the localhost page works fine on my browser, it does not show the web page on any other devices. Why will it not display
(P.S. I am a beginner at networking, so if this is a dumb question, please just let me know

localhost always points to the "local machine". To access the Apache server from a second computer, you'll need to use the IP address for it.
For example, if the Apache server's IP is 192.168.123.456, you would use http://192.168.123.456 from the second computer. If you went to http://localhost on the second computer, it would be looking for a web server on that second computer.

Related

Apache in WSL2 dos not work like localhost

Dear colleagues in the network,
I'm trying to make my apache + php work localhost in the browser (chrome, firefox, edge ...) windows accessing localhost with apache installed on WSL2 with Ubuntu. But it does not work. Changing WSL to version 1 then works. After trying to understand a lot, I saw that WSL2 has a different IP than windows. Another band and another network submask so that WSL2 is not on localhost as WSL1 is.
Has anyone had this problem and managed to solve?
I'm new to Stack and can't post images yet. But I posted a print on the link: https://prnt.sc/t4abiu. If you can help me I appreciate it very much. Meanwhile I follow with Apache and PHP directly on windows.
PS .: Node, MariaDb, Postgres and MongoDb work as localhost normally. Apache only doesn't work
I finally found an answer. On Windows, port 80 is used by the www service. In my case, I just to uninstall the Windows feature and apache respond normally on port 80.
I hope this helps someone

Cant access internal http server via mobile device

I am running an Apache server (WAMP .- Windows / Apache / MySQL / PHP installation).
I am running a HTTP server for some development I am doing. This project involves comunicating with a HTTP server running Firebird.
Now, all is well until I try use the external IP address from a mobile device to access the server. Then it just times out.
I have correctly setup port-forwarding on the router and everything is accessible from ANY other computer. So the url goes something like this..
http://70.12.123/scriptToRun.php
To test this, I have connected from another computer on the LAN and it connects fine. I have used Teamviewer and connected from a computer NOT on the LAN. That also connects fine.
However, whenever I try to use the same url from a mobile device (phone) it just times out.
Anyone have any ideas why I cant connect using a mobile ?
Dave

Why can't my friends access my website built with Apache2?

So, I have been building this website with HTML and I decided to host it with on Apache2. It runs on an Ubuntu and me already changed the VM assigned Ip, which is 10.2.0.15, into another one. I can access it on the Mac where the VM is, but I asked my friend if he can open it, and he said it was a 404 Server not found error.
Please help!
You probably need to enable port forwarding:
https://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/
You haven't indicated what VM software you are using, but the above is for VirtualBox. VMware is a bit different. Also make sure your router is not blocking any packets or any firewall.

Can't access to wamp/xampp apache localhost:80 WINDOWS 10

I recently upgrade my Windows 7 to Windows 10 (9). I need to use Apache server for web development. But for some reason I can't access it via web browser.
First I tried to look in the firewall and antivirus settings. It looks fine. I've tried reinstall xampp then I tried Wamp. Nothing working. I'tried 3 web browsers Edge, Opera, Chrome. Then I tried to find if some application is blocking port 80. So I disabled Skype, IIS. Then I tried different ports 8080,9080,123. Still can't access it via browser, but ping works.
Then I disable preference of Ipv6 and I prefer IPV4 now. I've changed HOSTS file so only 127.0.0.1 localhost is uncommented.
Only problem occurs when I try run wamp my internet access became unavailible and a have to restart computer to access internet again.
Has anyone here have same problem, because according to everything I ve done it seems apache server and network settings is correct.
Maybe problem is somewhere else?
Thank you for your help.
Solved with clean Windows 10 installation.

How to configure VMware workstation for VHD

I am able to hook SharePoint 2010 VHD with vmware. The central admin comes up but port 80 dont even come up. I ran into this http://blogs.msdn.com/b/steve_fox/archive/2010/06/15/rtm-demo-vm-for-sharepoint-amp-office-2010.aspx article but I dont know to perform this in VMWare Station 8. Please suggest.
Ping localhost host gives 127.0.0.1. But I get 404 both on localhost and 127.0.01
Ping to intranet.contoso.com takes a long time and i get request could not find host ....
Binding looks good too.
I am not seeing anything in IIS log . I mean nothing specific to intranet.contoso.com.
Looks like a DNS Issue to me. Try to add intranet.contoso.com to the hosts file as:
intranet.contoso.com 127.0.0.1
If this works then it is definitely a DNS issue, check if the service is running.
Also check if you actually assigned a virtual network card to the box in VMWare.
Update: To add NIC to VM Ware you edit machine settings and add hardware, add a network card as bridged. You can then manage the network card normally inside Windows.