search

Home  >  Q&A  >  body text

nginx - lnmp build environment can be accessed locally, but cannot be accessed from the external network

For example, localhost/phpinfo.php can be accessed, 192.168.1.X/phpinfo.php cannot be accessed~

習慣沉默習慣沉默2811 days ago880

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 17:27:11

    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:

    • Turn off local firewall
      Or
    • Add the 192.168.1.x rule pointing to localhost in the hosts file

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-16 17:27:11

    Where do you think 192.168.1.x (your local machine) is equal to localhost?

    reply
    0
  • Cancelreply