For example, localhost/phpinfo.php
can be accessed, 192.168.1.X/phpinfo.php
cannot be accessed~
The local firewall configuration and router settings are not given. The computer itself does not know that 192.168.1.x is the local computer. The request goes to the router and then returns.
Try the following:
Where do you think 192.168.1.x (your local machine) is equal to localhost?