禁止远程访问 Tomcat 管理器?
根据 Tomcat7 文档,我可以添加一个阀门来阻止从 localhost 之外访问 Tomcat Manager 应用程序:
<Context privileged="true">
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.0\.0\.1"/>
</Context>
这些文档对于解释该 XML 片段应该去哪里没有太大帮助。
有人可以帮我解决这个问题吗?
According to the Tomcat7 docs, I can add a valve to prevent access to the Tomcat Manager app except from localhost:
<Context privileged="true">
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.0\.0\.1"/>
</Context>
The docs are not so helpful in explaining where that snippet of XML is supposed to go.
Can someone help me with this, please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您修改 CATALINA_HOME/conf/Catalina/localhost/manager.xml 来添加过滤器,以仅允许本地访问(如您的帖子中所示)或特定 IP
在
manager.xml
的Context
标签You modify
CATALINA_HOME/conf/Catalina/localhost/manager.xml
to add the filter to allow only local access (as in your post) or specific IPsAdd the
valve
within theContext
tag of themanager.xml