1、给tomcat添加管理用户
访问tomcat主页 http://localhost:8080/ ,想进入网站管理必须要有用户名和密码,否则进不去
进入tomcat下的conf文件夹,打开tomcat-users.xml文件,在文件的倒数第二行插入以下代码
<role rolename="manager-gui"/>
<user username="bai" password="" roles="manager-gui"/>
2、修改tomcat访问端口
在conf文件夹,打开server.xml,将8080修改成其他端口(tomcat默认端口是8080)
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->