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

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

403 Access Denied

You are not authorized to view this page.

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.

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.

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.

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文件,将文件中对访问的来源受限设置注释:

<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" />
-->
</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. 《跟我学shiro》

    张开涛<跟我学shiro>博客系列: Shiro目录 第一章  Shiro简介 第二章  身份验证 第三章  授权 第四章  INI配置 第五章  编码/加密 第六章  Realm及相关对 ...

  2. 【Angular】学习笔记-环境部署、项目建立相关

    Angular官网>搭建环境 首先要安装Node.js.官网>Download 一直next就好了. 安装node.js的目的是使用npm这些命令啦 然后这里推荐下载使用git SCM 也 ...

  3. iOS随记

    ios 10 访问设置问题 从ios8之api支持访问设置通过访问UIApplicationOpenSettingsURLString来跳转设置 NSURL*url=[NSURL URLWithStr ...

  4. 002 C/C++ 数组的传递

    传递一个数组给一个函数的正确做法: 1.传递数组的内存首地址. 2.传递数组的有效长度.指数组的元素数量. 编译器总是将数组类型的变量作为指针传递. 计算数组的长度: int length = siz ...

  5. layUI学习第三日:layUI模块化开发

    layui 定义为「经典模块化」,具备早前 AMD 的影子,又并非受限于 CommonJS 的那些条条框框, BootStrap 的不同在于:layui 糅合了自身对经典模块化的理解. 除了 layu ...

  6. 设计模式-Adapter(结构型模式)针对第三方库 函数 接口不匹配的问题,分为类模式 与 对象模式 两种

    以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //****************************类模式的Adaptr*********************** ...

  7. Yet Another Broken Keyboard

    time limit per test2 secondsmemory limit per test256 megabytesinput: standard inputoutput: standard ...

  8. UmiJS 目录及约定

    在文件和目录的组织上,umi 更倾向于选择约定的方式. 一个复杂应用的目录结构如下: . ├── dist/ // 默认的 build 输出目录 ├── mock/ // mock 文件所在目录,基于 ...

  9. 【TCP/IP网络编程】:01理解网络编程和套接字

    1.网络编程和套接字 网络编程与C语言中的printf函数和scanf函数以及文件的输入输出类似,本质上也是一种基于I/O的编程方法.之所以这么说,是因为网络编程大多是基于套接字(socket,网络数 ...

  10. ES6入门 阮一峰

    ECMAScript 6 入门 http://es6.ruanyifeng.com/#README 在线ES6转ES5 https://es6console.com/k11vgg1r/