某个Tomcat有两个Host,一和hostA,一个hostB,都给他们了Manager程序,在tomcat-users.xml中写了两个具有manager角色的用户,一个是userA,给hostA使用,另一个是userB,给hostB使用,让他们可以分别登录各自的Manager程序,管理自己的应用。但是,经测试发现,hostB完全可以使用userB进入到hostA的Manager中,反过来也一样,解决方法如下:
〈!-- 在你的hostA里manager的web.xml,把your-role替换成你的tomcat-users.xml定义的用户就行了。 --〉
〈!-- Define a Security Constraint on this Application --〉
〈security-constraint〉
〈web-resource-collection〉
〈web-resource-name〉Entire Application〈/web-resource-name〉
〈url-pattern〉/manager/*〈/url-pattern〉
〈/web-resource-collection〉
〈auth-constraint〉
〈role-name〉your-role〈/role-name〉
〈/auth-constraint〉
〈/security-constraint〉
〈!-- Define the Login Configuration for this Application --〉
〈login-config〉
〈auth-method〉BASIC〈/auth-method〉
〈realm-name〉Application〈/realm-name〉
〈/login-config〉
〈!-- Security roles referenced by this web application --〉
〈security-role〉
〈description〉
The role that is required to log in to the Manager Application
〈/description〉
〈role-name〉your-role〈/role-name〉
〈/security-role〉
分享到:
相关推荐
Tomcat虚拟主机配置
tomcat虚拟主机,tomcat目录,tomcat6
tomcat虚拟目录配置 web服务器配置技术
tomcat配置虚拟主机,有详细的步骤,经测试已经成功,希望对需要的人有帮助!
Tomcat 9 虚拟路径配置
Tomcat5_x中的虚拟主机配置方法
tomcat虚拟路径配置,tomcat配置虚拟路径,简短代码,一目了然
tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-redis-session-manager-1.2-tomcat-7-java-7tomcat-...
tomcat虚拟目录和虚拟主机的配置。照葫芦画瓢就可以,建议先搞,然后再了解原理。 1.可以一个端口地址后面跟多个web,这个可能软件部署的时候用的比较多 2.也可以一个tomcat配置多个站点,绑定多个域名。这种可能是...
详细讲解使用tomcat服务器时,项目的虚拟路径配置
Tomcat8亲测可用 tomcat-redis-session-manager的jar包 修改了tomcat-redis-session-manager源码进行的编译生成的jar包
压缩文件包括tomcat-redis-session-manager-master-2.0.0.jar、jedis-2.7.3.jar、commons-pool2-2.3.jar三个jar包使用方法请参照https://github.com/jcoleman/tomcat-redis-session-manager。apache-tomcat-8.5.33....
Apache2.2多个虚拟主机+Tomcat6多个虚拟主机整合配置,亲自试验,有问题联系我
用于配置 tomcat-redis-session-manager
TOMCAT 8.5的服务器状态、Tomcat Web应用程序管理者、Tomcat虚拟主机管理员设置
因tomcat7使用redis共享session,其他的包存在问题,自己编译后处理通过。 该包是在https://github.com/jcoleman/tomcat-redis-session-manager 将源码编译后的包。
所需的tomcat-redis-session-manager所有的jar包下载。测试环境JDK1.8,Tomact8
使用tomcat-redis-session-manager进行统一session管理所需jar包,包括tomcat6-jdk6、tomcat7-jdk7、tomcat8-jdk8
tomcat-redis-session-manager-2.0.0.jar jedis-2.5.2.jar commons-pool2-2.2.jar 2.修改 conf 目录下的 context.xml 文件 <Valve className="com.orangefunction.tomcat.redissessions....