问题
I'm using Xampp localhost on my laptop with windows 8.1 and i'm trying to access it through my mobile, i opened CMD and typed ipconfig and the IPV4 adress was 192.168.1.3
i opened it via my laptop and it shows xampp folders normally but when i put the ip in my mobile browser it gives me nothing (This web page is not available - ERR_CONNECTION_TIMED_OUT)
How can I Acess Xampp from my android device then?
My mobile is connected to the same WIFI network and i've tried to access the localhost from another laptop on the same network and it didn't work also.
回答1:
These are the steps to follow
Open the file
httpd-xampp.conf
. Edit and change the line from Require all local to Require all granted.Now open the cmd/terminal and run
ipconfig
and find the local IP of the computer where XAMPP is runningNow go to
http://10.0.0.6/websitefolder/
from any device connected on the same wifi/ethernet network. You can see the website is loading.If you are trying to access a dynamic site using cms like WordPress, it may hit the error like connection refused or file not found.
I follow this step to fix error on WordPress, Change the wp site URL and home URL from
http:localhost/sitename/
tohttp:10.0.0.6/sitename
, Refer the screenshots for more details. (Change the highlighted URL fromlocalhost
to10.0.0.6
)
回答2:
After adding your laptop after address still you have trouble opening your xampp on your mobile then check your firewall setting.firewall should be off
回答3:
You need to make your XAMPP accessible over the network. To do this, find the httpd.conf file, and edit Directory tag. Make it look like this:
<directory "d:="" cofeeshop"="">
AllowOverride All
Options All
Order allow,deny
Allow from all // Allow from all make is accessible over the network
</directory>
回答4:
It sounds like either the port is not open or the you are not entering the correct port or port all together.
Many times the port, if not 80, uses port 8080 and so the address would look like this.. 192.268.1.3:8080
So make sure if you are not using the standard 80 port to add the correct port or check https://www.yougetsignal.com/tools/open-ports/ to see what ports you have open based on your real ip address.
If anything you may need to log onto your router and open the port and use the port forwarding option to route to your machine running Xampp.
Which may also require some research on how to port forward on your particular router.
回答5:
Your laptop is connected to internet via wifi, right? That means that you have ssid isolate (or something like that) enabled on your router's wifi settings. So......... Devices on your wifi cant see each other or contact them. Find your gateway (like 192.168.2.1 or 1.2.168.1.1) go to your router's settings and disable ssid isolate. I had a same problem too and it worked. Hope this helps!
来源:https://stackoverflow.com/questions/32573855/accessing-xampp-localhost-from-my-mobile