若是遇到這個問題的朋友,找到這個帖子,恭喜你,在茫茫互聯網中終於找到了那顆閃亮的珍珠web
解決此問題,分兩步:
1、修改TOMCAT_HOME/conf/tomcat-users.xml,按照本身的偏好參考以下設置:
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>apache
2、修改TOMCAT_HOME/webapps/host-manager/META-INF/context.xmltomcat
<Context antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
</Context>app
修改爲webapp
<Context antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="^.*$" />
</Context>ui
3、修改TOMCAT_HOME/webapps/manager/META-INF/context.xmlxml
<Context antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
</Context>class
修改爲gui
<Context antiResourceLocking="false" privileged="true" >
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="^.*$" />
</Context>互聯網
4、進入TOMCAT_HOME/bin,重啓
執行:shutdown.sh
執行:startup.sh