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
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
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.
You must bind hosts and assign your domain name to the server IP address of the virtual machine
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
First ping the ip of the virtual machine under window