除了以下内容之外,任何人都知道如何限制对Apache Tomcat 6.0的访问:
1)允许从Web服务器(apache httpd)通过AJP端口访问
<Connector port="1010" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="1443" maxSavePostSize="-1"/>
2)允许从localhost通过普通的http连接器端口
进行访问<Connector port="1010" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="1443" maxSavePostSize="-1"/>
3)允许用户通过Web服务器(apache httpd)连接到Web应用程序
我试图通过更改web context.xml来限制访问(10.160.2.149指的是web服务器的ip - apache httpd):
<?xml version='1.0' encoding='utf-8'?>
<Context debug="4"
displayName="MYAPPS"
docBase="C:\Frontend"
path="/abc/devp/fe"
privileged="true"
reloadable="true">
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1,10.160.2.149"/>
<Manager className="org.apache.catalina.session.PersistentManager"
entropy="org.apache.catalina.session.PersistentManager@1ac5f13"
maxActive="1"
maxInactiveInterval="1800"
saveOnRestart="false"
sessionCounter="1">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>
</Context>
答案 0 :(得分:0)
在这里,您可以找到如何限制对Tomcat访问指定IP地址或如何请求用户身份验证的说明 - Secure Tomcat Hosting: Restrict Access to Your Web Application