Tomcat 访问manager 403

Posted hjrefueling

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Tomcat 访问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.

引用地址:http://blog.csdn.net/supersyd/article/details/52075254






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

Tomcat 访问manager app报403 解决方案(虚拟机可以正常使用,外面访问报错)

Tomcat7/8访问Server StatusManager AppHost Manager出现403 forbidden

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

远程访问Tomcat 403 Access Denied

403 Access Denied on Tomcat 7 Manager App的问题

maven Tomcat idea 热部署