访问远程服务器Tomcat 8的管理页面报错

在远程服务器上安装了一个tomcat8.5,配置好用户后重新启动tomcat ,发现:8080可以访问,但是进入:8080/manager/html页面报403访问受限,具体报错信息如下:

  1. 403 Access Denied
  2. You are not authorized to view this page.
  3. By default the Manager is only accessible from a browser running on the same machine as Tomcat. If you wish to modify this restriction, you'll need to edit the Manager's context.xml file.
  4. If you have already configured the Manager application to allow access and you have used your browsers back button, used a saved book-mark or similar then you may have triggered the cross-site request forgery (CSRF) protection that has been enabled for the HTML interface of the Manager application. You will need to reset this protection by returning to the main Manager page. Once you return to this page, you will be able to continue using the Manager application's HTML interface normally. If you continue to see this access denied message, check that you have the necessary permissions to access this application.
  5. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.
  6. For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.

网上搜了很多,但都不可行,最后在stack overflow上看到正解,所以记录保存下,修改

/webapps/manager/META_INF/context.xml文件,将文件中对访问的来源受限设置注释:

  1. <Context antiResourceLocking="false" privileged="true" >
  2. <!--注释这里,去除对访问权限的设置
  3. <Valve className="org.apache.catalina.valves.RemoteAddrValve"
  4. allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
  5. -->
  6. </Context>

然后直接刷新页面就行了,无需重启tomcat。

Stack Overfow问题链接地址:http://stackoverflow.com/questions/36703856/access-tomcat-manager-app-from-different-host?rq=1

登陆远程服务器的Tomcat 8的manger的页面403的更多相关文章

  1. ssh免密码登陆远程服务器

    ssh免密码登陆远程服务器 在使用windows下的cygwin或者在linux下使用Terminal进行远程服务器登陆测试的时候总是会要求输入账号密码,对于此我们可以使用ssh将公钥放在服务器上的方 ...

  2. 通过expect免自动输入密码登陆远程服务器

    通过expect免自动输入密码登陆远程服务器 1.前提必须已经安装expect 2.新建login.sh,文件内容如下 #!/usr/bin/expect -f spawn ssh root@140. ...

  3. jenkins部署war包到远程服务器的tomcat

    一.目的 jenkins上将war包,部署到远程服务器的tomcat上. 这边tomcat在windows 主机A上,版本apache-tomcat-8.5.23. jenkins在主机B上,cent ...

  4. Linux 系统免密码登陆远程服务器

    在当前Linux生成公钥私钥ssh-keygen公钥私钥存放路径为:~/root/.ssh/id_rsa id_rsa.pub 登陆被远程主机,进入目录~/root/.ssh/是否存在authoriz ...

  5. linux expect自动登陆远程服务器 批量管理服务器

    #!/usr/bin/expect set ipaddress [lindex $argv 0] set passwd [lindex $argv 1] set timeout 3 spawn ssh ...

  6. linux ssh免密登陆远程服务器

    10.170.1.18服务器免密登录到10.170.1.16服务器 首先登入一台linux服务器(10.170.1.18),此台做为母机(即登入其他linux系统用这台做为入口):执行一行命令生成ke ...

  7. xmanger图形化登陆远程服务器

    由于网上的资料比较杂,经过本人整理实际操作验证,保证ok  本人的服务器系统为centos5.8 下面的都是centos服务器上的操作,需要简单的配置下: win客户端使用xmanger软件:首先是服 ...

  8. Shell登陆远程服务器

    现场服务器较多,密码3个月过期,在到期时需更改密码. 使用expect编写,尝试登陆2次后退出(防止密码错误时账号锁定),超时重试一次. shell脚本调用并定时执行,登陆成功后执行一条命令,如:ho ...

  9. 【网络安全】telnet 登陆远程服务器

    • 实验环境:        a. Vmware 14 PRO        b. windows 7 x64 客户机        c. windows server 2008 R2 x64 服务器 ...

随机推荐

  1. IDEA 运行后乱码问题解决

    页面乱码: 在edit configurations->vm options 添加 -Dfile.encoding=UTF-8 调整idea文件编码格式,全部为 UTF-8 (file -> ...

  2. 30-学容器必须懂 bridge 网络

    Docker 安装时会创建一个 命名为 docker0 的 linux bridge.如果不指定--network,创建的容器默认都会挂到 docker0 上. apt-get install bri ...

  3. django models 数据库操作

    django models 数据库操作 创建模型 实例代码如下 from django.db import models class School(models.Model): pass class ...

  4. Octave中的矩阵常用操作2

    sum(a):矩阵里的数据求和prod(a):乘积floor(a):向上取整ceil(a):向下取整max(A,[],1):取每一列的最大值max(A,[],2):取每一行的最大值max(max(A) ...

  5. linux系统编程(一)概述

    glibc库封装了linux系统调用,并提供c语言接口 所以学习linux系统编程,主要参考glibc库系统调用相关api 一.进程控制: fork 创建一个新进程 clone 按指定条件创建子进程 ...

  6. idea安装以及使用

    1. 简介1.1 IDEA 全称 IntelliJ IDEA,是java语言开发的集成环境,IntelliJ在业界被公认为最好的java开发工具之一,尤其在智能代码助手.代码自动提示.重构. J2EE ...

  7. Java总结转载,持续更新。。。

    1.Java中内存划分 https://www.cnblogs.com/yanglongbo/p/10981680.html

  8. java之API初识

    API概念 API(Application Programming Interface),应用程序编程接口.JavaAPI是一本程序员的字典 ,是JDK中提供给 我们使用的类的说明文档.这些类将底层的 ...

  9. MQ的幂等性和解决方案

    1.幂等性 在编程中一个幂等操作的特点是其任意多次执行所产生的影响均与一次执行的影响相同.通俗的讲就一个数据,或者一个请求,给你重复来多次,你得确保对应的数据是不会改变的,不能出错:类似于数据库中的乐 ...

  10. python--8大排序(原理+代码)

    常用的排序方法:冒泡排序.选择排序.插入排序.快速排序.堆排序.归并排序 冒泡排序(Bubble Sort): 比较相邻的元素.如果第一个比第二个大(升序),就交换他们两个. 对每一对相邻元素作同样的 ...