Tomcat can be accessed through localhost in the LAN, but cannot be accessed through a local IP address, and 127.0.0.1 cannot be accessed.

Source: Internet
Author: User

Environment: tomcat6, Windows server2008 R2, Tomcat uses the default port 8080.

Use Tomcat 6 on the Bo server as the Web server. Use http: // localhost: 8080/BOE/Bi on the server to access the logon interface of the BoE PLATFORM, but use http: // 127.0.0.1: 8080/BOE/Bi cannot be accessed, and http: // 111.111.111.20.: 8080/BOE/Bi cannot be accessed using the local IP address.
The solution is as follows:

Modify the firewall configuration of Windows 7.

1. Start ---- Control Panel ---- system and security ---- Windows Firewall ---- Advanced Settings

2. Select "inbound rules"-click "new rule"-"rule type" and select "Port"-"Next"-apply the rule, select "TCP"-"specific local port" and enter "8080" (Tomcat port used)-"Next"-select "allow connection ", click "Next"-when to apply the rule, select all by default, click "Next"-enter a name for the rule, such as "Tomcat open port 8080"-click "finish"

Now, Tomcat can use the Windows Firewall.

3. Modify the tomcat configuration file in the conf directory under the tomcat installation directory, tomcat6 \ conf \ Server. XML. Add address = "0.0.0.0" in the port setting area. The Modification result is as follows:

<Connector Port = "8080" protocol = "HTTP/1.1"
Maxthreads = "150" connectiontimeout = "20000"
Redirectport = "8443" address = "0.0.0.0"/>

The red part is added.

Finally, restart the Tomcat service in CCM to access the Bo logon interface using the IP address.

Tomcat can be accessed through localhost in the LAN, but cannot be accessed through a local IP address, and 127.0.0.1 cannot be accessed.

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.