Access localhost(wamp) with other device - php

We know that if we open wampmanager in windows, we can access to localhost with enter localhost or 127.0.0.1 in browser
But if we want to access it in other device (mobile or tablet), we cannot enter localhost in browser.
So we enter the IP that wamp is running on.
Example 192.168.1.2:80
But when I use this IP in browser, I cannot see localhost.
I changed IP in httpd.conf, but it is not working.

Try disabling Windows firewall. If that works, open port 80 in the firewall settings and reenable.

Related

WAMP my own internal ip doesn't work on browser

I have installed WAMP and my computer ip is http://192.168.1.142/
When I entered it in browser I got nothing, my WAMP server doesn't see this ip
I got error :
**This 192.168.1.142 page can’t be found
No webpage was found for the web address:
192.168.1.142 HTTP ERROR 404**
http://prntscr.com/fx1mri
Tried configure httpd.conf Want add there row Listen 192.168.1.142:80 and when I run restart WAMP it's not green , means apache doesn't run ,
How correct this ? Why my local IP can't reach in my browser ?
Probably there will be 2 approach to solve this-
You need to provide the ip-address instead of localhost in your code.
Try not to use Skype at the same time since it uses same port number.
If it's your local computer I'll recommend you to use "http://localhost" or "http://127.0.0.1". Prefer localhost.
If you want to use some other cool hostname you should add it to your (windows)hostfile %SYSTEMROOT%\System32\drivers\etc\hosts
Example of input:
127.0.0.1 localsecure
Other programs like skype and torrent are usually using the same ports. Go to your httpd.conf and change listen to for example 82 and the servername to localhost:82(the port is always the same as the value of listen). And than you can use localhost everywhere for example your phpmyadmin would be:
localhost:82/phpmyadmin
And the directories:
localhost:82/..
Credit: ndsmyter

How to setup my localhost server so that I don't have to enter the port number to surf the site?

I started a server inside my PC and when I want to visit localhost with a browser I have to write
localhost:8080
When I am trying to enter in the site with another PC or Phone through WIFI I have to write something like:
192.168.0.123:8080
My question is, is there any way I can enter inside the site I am hosting inside my PC without writing the port, like:
192.168.0.123
(N.B. : I just want to use this inside my wifi network. Going public is not my target)
With http, unless the port is 80, you have to specify it.
So you'll have to configure your server to use port 80 instead of 8080.

Not able connect mobile to WAMP

I am using WAMP(version 2.4.9) to host a local server on my pc. My pc is connected to wifi and the ip address is 10.192.48.252 . The port is 420. When I type http://10.192.31.222:420/ in the browser of pc, I get the wampserver homepage as it should be but when I type in the same address in my mobile browser, I get the following error
Forbidden
You don't have permission to access / on this server
I have connected both my pc and mobile over same wifi network. I have set "Require all granted" in httpd.conf file and made 420 accessible through firewall. Please help.
I was also having the same issue as yours. Try XAMPP. Its working fine for me. It has no port issue.

ERR_CONNECTION_REFUSED in wamp from public ip in "My system"

I can access my wamp server via localhost in my system (port :8080), but not with public ip.
But then again when i try to access my wamp from other networks via public ip, yes i can get in.
The error i receive is "ERR_CONNECTION_REFUSED" it says that connect is rejected.
I have configured everything correctly, yes i have the apache config file set to allow all.
any clue?
Take a look at this. LINK
It could be NAT loopback that causes this for you

External XAMPP Access With Modem

I'm trying to create a live web server on my Windows 8.1 computer.
I am connected directly to my modem using ethernet (I do have a wireless router) but I am not connected to it on this computer (desktop).
I have XAMPP working and my website appears at http://localhost/home
However, if I put in my IP from www.whatismyip.com it does not load my web server.
What am I missing?
You need to create a Port Forwarding for Port 80 to your Computers local IP Address. There should be a Admin Panel for your Router (normally the Gateway - check out with Start - Run - cmd -> then insert "ipconfig" and check out the Gateway.
And i guess in XAMPP the Internet Access is blocked. But this is a simple Apache Server, so you need to open your httpd.conf File (Should be: “c:\xampp\apache\conf\extra\httpd-xampp.conf)
Search here for:
There should be a "Deny from all" - add a # in Front to deactivate that rule.
Restart your Xampp and it should work.
Here you find more Information about Port-Forwarding:
https://managewp.com/how-to-access-a-local-website-from-internet-with-port-forwarding
Any maybe you will also need to activate Port 80 on your Firewall (depends on your Configuration)
You need a method of telling request sent to your public ip to be forwarded to the private ip of the web server. Try logging into you device (router etc) and setting this up.

Categories