Apache in WSL2 dos not work like localhost - apache

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

Related

I can not access localhost on other devices on my router

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.

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.

odoo 9 installed on windows 7, not accessible through intranet network using ip:8069 works fine on installed system

I have installed odoo 9 on a windows 7 machine..
All working well when i try to access like localhost:8069 or 192.168.1.11:8069
But the same dosnt work when i try to access from locally connected computers.. I am trying to access odoo from computers connected through lan..
trying to access 192.168.1.11:8069
However If I try to access Xampp Server using the ip it works well..
when I ping 192.168.1.11:8069 from any network computers it shows 'unknown host'
I am relatively new to this kind of network config thing.. Hope if anyone had similar issue and have sorted it out??
PS. Same thing happens when I install odoo on an Ubuntu 14.04 based computer..
Looking Forward to a solution.
Thanks in Advance.
VJ
There is a number of reasons that can cause this. What you are describing is a network issue and not a odoo issue. You cannot ping xxx.xxx.xxx.xxx:port number. I would start with some of the obvious tests:
Disable the firewall and anti-virus
If it is the firewall, set it up to open port 8069 and make sure that the firewall allows connections from other computers.

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.

Apache Tomcat not working in every web browser installed in Windows7 32Bit

I'm working on a web application in JSP and my web container is Apache Tomcat 7.0.2 (Its portable cross-platform version). As I've made extensive use of HTML5-CSS3 and my target browser is Google Chrome, I'm able to run the the Apache server only in Opera web browser, neither of the remaining installed browser run it.
Here's the steps I have followed to start the server in my Windows 7 machine.
-Installed the Apache Tomcat service in Windows from apache-tomcat-7.0.2/bin/service.bat
-Started the service with tomcat7w.exe
-As my default port is 8080, I open 'http://localhost:8080/' in various web browsers, and I could see Apache Server Homepage with same address only in Opera Web Browser (11.01), neither of other browsers installed can open it (Chrome 9, Firefox 4 Beta 11 or IE8) and show standard page not found message.
-I also tried other port numbers, but none of them worked.
What can I do to make Apache run in every browser installed in my computer?
I have my computer dual boot with Windows 7 and Ubuntu 10.10, and in Ubuntu, every web browser installed can run Apache once I start it, but same is not working in Windows.
Update:
I have also tried apache's windows-only installer of version 7.0.8 and changed the port number during installation, but still I can't run it on any other browser expect for Opera...
Any help will be appreciated............
Thanks.
Check your hosts file under C:\Windows\system32\drivers\etc\hosts to make sure that the entry for
127.0.0.1 localhost
is intact. Also see that if you are behind a proxy server, the settings allow for localhost to be bypassed.
Congo!! finally got it done, instead of localhost, it works with 127.0.0.1 (which is localhost anyway)
So those who are facing similar issues, as suggested by adarshr, go through your hosts file to see if localhost is correctly addressed to 127.0.0.1, or if you don't want to edit that file, you can still get it done by simply using http://127.0.0.1:8080/ instead of http://localhost:8080/. Please be sure about port number you are using, in my case it was 8080, it might vary depending on how you've configured.