以前修改了conf/tomcat-users.xmlweb
<role rolename="manager-gui"/>apache
<user username="user" password="password" roles="manager-gui"/>tomcat
但仍是訪問不了管理頁面。app
解決辦法:webapp
新建conf/Catalina/localhost/manager.xml 內容以下:ui
<Context privileged="true" antiResourceLocking="false"
docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>spa