How to use your computer as a server to publish Tomcat web projects for Internet and LAN Access

Source: Internet
Author: User

Place the war file of the project in the webapps directory of Tomcat. You can use either the Internet or the LAN.


1. First, make sure you have an Internet IP address. If you are assigned a lan ip address, you need to convert it to an Internet IP address in a series, and then proceed with the following operations.

2. Get the Internet IP address and configure the Tomcat server. xml file. Configure the following three parts (the tomcat version used in this configuration is 7.0.30)

1) <connector Port = "80" protocol = "HTTP/1.1" connectiontimeout = "20000" redirectport = "8443"/> change the port to 80, HTTP-based access is generally through port 80, which can avoid the trouble of entering 8080 every time.

2) <engine name = "Catalina" defaulthost = "171.35.52.187"> change the localhost of defaulhost to your own Internet IP address and provide it to external users.

3)

<Context Path = "" docbase = "/sudentmanager" reloadable = "true" crosscontext = "true"> </context> change the name in the host to an Internet IP address, at the same time, add the context tag to the tag. The content is as above. docbase represents the default project name.

After the configuration in the preceding three steps, the server configuration has been implemented. We can start Tomcat and access the project directly through the IP address.


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.