Host Windows 7 accesses tomcat and nginx of linux virtual machines

Source: Internet
Author: User
: This article mainly introduces tomcat and nginx for accessing linux virtual machines on Windows 7 host machines. if you are interested in PHP tutorials, refer to them. First, it is emphasized that the host and the virtual machine set up by VMware communicate in NAT mode.

Briefly describe the steps for successful service access:

1. make sure that the tomcat or nginx service is enabled on your VM;

2. Add the port forwarding configuration in the virtual machine. in the vmware menu bar, edit the configuration> Virtual Network editor:


Click "Add..."


Add the port on which you want to forward data to the VM through the host,


Click OK.

If you cannot access the port you forwarded locally, analyze the cause:

For example, the port you forward is 8000.

1. telnet localhost 8000 on the win7 host. if you can connect to it, it means there is no problem on the win7 host;

2. disable the firewall of your virtual machine in two ways:

I) service iptables stop)

II) chkconfig iptables off (feature: the server needs to be restarted and takes effect permanently)

If neither of the preceding methods is available, set selinux to disabled:

First, check the selinux status command:

/Usr/sbin/sestatus-v,

If it is enabled, change the vi/etc/selinux/config file to disable it:

In the config file, find SELINUX = enforcing and change it to SELINUX = disabled.

Restart the machine. OK.

I spent two nights doing well. it turned out to be the cause of selinux. after being set to disabled, the access was successful. haha, thank you for your help!

The above introduces tomcat and nginx for accessing linux virtual machines on the Windows 7 host machine, including some content, and hope to help those who are interested in PHP tutorials.

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.