tomcat 8.* manager 403

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat 8.* manager 403相关的知识,希望对你有一定的参考价值。

修改conf/tomcat-users.xml

<role rolename="manager"/>

<role rolename="manager-gui"/>

<role rolename="admin"/>

<user username="user" password="password" roles="admin,manager,manager-gui"/>

同时还需要修改(如无则新建一个)conf/Catalina/localhost/manager.xml 内容如下:

<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager">

    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />

</Context>

无须重启tomcat即可生效。

 

引用原文:

Each deployed webapp has a context.xml file that lives in $CATALINA_BASE/conf/[enginename]/[hostname] (conf/Catalina/localhost by default) and has the same name as the webapp (manager.xml in this case). If no file is present, default values are used.
So, you need to create a file conf/Catalina/localhost/manager.xml and specify the rule you want to allow remote access.

以上是关于tomcat 8.* manager 403的主要内容,如果未能解决你的问题,请参考以下文章

tomcat8 安装|解决启动慢|进入管理|host-manager 403错误

Tomcat 访问manager 403

Tomcat 访问Manager APP报403错误

Tomcat manager页面 403的真正原因及解决办法

tomcat的管理(manager)报错403

tomcat8 进入不了Manager App 界面 403 Access Denied