After Tomcat is installed, the default port is 8080. The default application accessed through http: // localhost: 8080/is the welcome page of Tomcat.
1. Change the default port to 80.
Find the server. XML in the conf folder under the installation directory, search 8080, and find three places, one of which is a comment, and change the other two places to 80.
<Connector Port = "80" protocol = "HTTP/1.1" connectiontimeout = "20000" redirectport = "8443"/> <conneexecuexecutor = "tomcatthreadpool" Port = "80" protocol = ""HTTP/1.1" connectiontimeout = "20000" redirectport = "8443"/>
2. Modify the Default Application
Add a line to server. xml:
<Context Path = "" docbase = "appname" DEBUG = "0" reloadable = "true"/>
Appname is the default application, and can be directly accessed through http: // localhost after the port is modified.
3. After modification, access http: // localhost/manager/html to deploy and restart the app.