The first emphasis is on the NAT communication between the host and VMware-built virtual machines.
Rough description of successful access to service steps:
1. Make sure that Tomcat or Nginx service is turned on in your virtual machine.
2. Add port forwarding configuration to the virtual machine, and the Virtual network editor, the VMware menu bar Editor ... Pop-up similar to:
Click "Add ..."
Add which port of the host you want to forward to on the virtual machine,
Click OK, basically done.
If the local access does not go to the port you forwarded, analyze the reason:
Like the port you're forwarding is 8000.
1, on the Win7 host telnet localhost 8000, if you can connect, indicating win7 no problem;
2. Turn off the firewall of your virtual machine in 2 ways:
I) service Iptables Stop (features: No need to restart the machine, can be effective in time, but after the virtual machine is turned on again, the firewall is still open)
II) Chkconfig iptables off (features: Need to restart the machine, permanent effect)
If none of the above 2 options are possible, then try setting your SELinux to Disabled by:
First check the SELinux status command:
/usr/sbin/sestatus-v,
If it is turned on, modify the Vi/etc/selinux/config file to turn it off:
Locate the selinux=enforcing in the config file and modify it to selinux=disabled
Restart the machine, OK.
I did 2 nights to do a good job, the original is the reason for SELinux, set to Disabled after the successful access, haha, or thank the great God for their help!
The above describes the Win7 host access to the Linux virtual machine tomcat, Nginx, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.