How to access the localhost? of pc with your mobile phone

Environment: pc and mobile phone are connected to the same router to surf the Internet, and pc is built using wamp (wampserver3.0.4_x86_apache2.4.18_mysql5.7.11_php5.6.19-7.0.4.exe).
symptom: mobile phone enters pc ip (LAN ip,192.168.1.*), mobile phone access is prohibited, various changes to apache configuration files (various versions, allow and grant) and pc network settings (including firewall rules) are invalid.
and there is currently no such question and answer on codeshelper.
Please give a systematic answer if you can.

Jun.30,2021

purpose to debug a mobile site?


I used to use it, but I suddenly found that I couldn't use it. Nima, if you have solved it, please @ me


, using wnmp architecture, upupw.net one-button package, there is no problem.


localhost is the loopback address to access the local machine. You can only access yourself on the mobile phone. Accessing pc is equivalent to visiting the server. Enter ipconfig after the pc command to view the IP address of pc, and access pc through this ip


is there any hints for mobile phone access?


  1. access the external IP of PC.

  2. can be accessed by hanging HTTP agent.

  3. Chrome to Mobile is fine, but I've only seen others use it, and I haven't tried it myself.
    the second is more commonly used by individuals.


the solution for the landlord is to use nginx, and then configure the first http segment

 autoindex on;
 autoindex_exact_size off;
 autoindex_localtime on;

use this software
https://ngrok.com/
download, decompress and install, enter the port number of your app
to run, and the web address at the beginning of http
opens
successfully with your mobile phone

Update:
although the above method is OK, the actual experience speed is relatively slow.
the following method is simpler and the speed will not be affected

http://blog.csdn.net/zxxzxx23.


this is similar to accessing local services from the external network. You can use some internal network penetration software, such as open source holer to configure a key to access the local services from the external network

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e49714-592bb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e49714-592bb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?