1, first you want to make sure that you have an external network IP address. If you assign a local area network IP address, you need to go through a series of conversions to an extranet IP address, and then proceed to the following operation.
2, get the external network IP address, the configuration of Tomcat Server.xml file. The following three places are mainly configured (the Tomcat version number used for this configuration is 7.0.30)
1) <connector port= "protocol=" http/1.1 "connectiontimeout=" 20000 "redirectport=" 8443 "/> Change port port to 80, HTTP-based protocols are typically accessed via 80 ports, which avoids the hassle of entering 8080 each time.
2) <engine name= "Catalina" defaulthost= "171.35.52.187" > To change the defaulhost localhost to your own extranet IP address, provided for outside access.
3) 171.35.52.187" appbase= "WebApps" unpackwars= "true" autodeploy= "true" >
<context path= "test" docbase= "d:/Sudentmanager" reloadable= "true" crosscontext= "true" ></Context> Change the name in the host to an external IP address, and add the context tag to the tag, as above, path represents the virtual path of the access, and Docbase represents the actual project path.
With the configuration of the above three steps, the configuration of the server has been implemented. We can start Tomcat, where the project can be accessed directly via an IP address.
The above methods are fully adapted to local area network use.
Server publishes Tomcat Web project for extranet access