search

Home  >  Q&A  >  body text

php - How to access the web project in the Linux virtual machine under Windows

The project is on the Linux virtual server and can be accessed in the virtual machine. I want to access it on Windows. What should I do? I have opened port 80 in the firewall, but I still cannot access it.

Can be accessed in the virtual machine

But you can access the server by entering the virtual machine IP

phpcn_u1582phpcn_u15822767 days ago680

reply all(5)I'll reply

  • 世界只因有你

    世界只因有你2017-05-31 10:35:43

    The most likely reason: the host's port 80 is not forwarded to the virtual machine;
    Other reasons: the virtual machine's firewall is not turned on; the domain name resolution of the host and virtual machine is inconsistent or wrong

    reply
    0
  • PHP中文网

    PHP中文网2017-05-31 10:35:43

    It may be a hosts problem. If the virtual machine has set the hosts of the test domain name to map to localhost, then your host should also set the hosts to map the test domain name to the virtual machine IP.

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-31 10:35:43

    You must bind hosts and assign your domain name to the server IP address of the virtual machine

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-31 10:35:43

    Use Notepad to open the hosts file under C:WindowsSystem32driversetc

    Add a line at the end

    hongbocheng 192.168.1.115

    Then save it to the desktop and paste it over the original file

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-31 10:35:43

    First ping the ip of the virtual machine under window

    reply
    0
  • Cancelreply