Win7 host access to the Linux virtual machine tomcat, Nginx

Source: Internet
Author: User
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.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.