我已编辑
/etc/tomcat/context.xml
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="\d+\.\d+\.\d+\.\d+" /
可能没有必要,但我还要重新启动tomcat
systemctl restart tomcat
现在打开浏览器并... 403
我想念什么? 系统是Fedora 29服务器,具有最新的tomcat9
答案 0 :(得分:0)
找到解决方案,要编辑的文件是
/var/lib/tomcat/webapps/manager/META-INF/context.xml
好行允许localhost +您的IP(在我的情况下为192.168.0.2)
<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|192.168.0.2" />
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>
重新启动tomcat并询问您在/etc/tomcat/tomcat-users.xml