虚拟机中Tomcat启动后,可以访问项目(虚拟机里面和外面都可以)。虚拟机中能够正常进入manager app进行热部署工作,但是在外面能访问tomcat首页,点击manager app报403错误。

  网上找许多都是说没有配置账号和密码,需要在tomcat 的conf中的tomcat-user.xml中增加账户、密码、权限,但是这只是第一步

  编辑tomcat下conf文件夹下的tomcat-users.xml

  增加一下内容

  <role rolename="manager-gui"/>

  <user username="myuser" password="mypass" roles="manager-gui"/>

  重启tomcat以后可以在虚拟机内使用manager app,但是虚拟机外不行。这是因为tomcat进行了ip限制,还需要将限制取消掉。将tomcat文件夹下的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,输入账号和密码就可以在虚拟机外访问到manager app了。

from:https://www.cnblogs.com/rogear/p/7462746.html

Tomcat 访问manager app报403 解决方案(虚拟机可以正常使用,外面访问报错)的更多相关文章

  1. Tomcat 访问Manager APP报403错误

    已在conf/tomcat-users.xml中添加用户信息 但是通过外网访问该tomcat的Manager App报403错误 原因是因为tomcat进行了ip限制,导致虚拟机中能够正常进入mana ...

  2. Linux安装Tomcat,解决不能访问Manager App

      在Windows环境中安装Tomcat时,只需要在Tomcat目录下/conf/tomcat-user.xml文件增加用户就可以了.在Linux系统中添加了username还是不能访问. 一.Li ...

  3. Tomcat8 localhost+端口可以访问Manager APP,而IP+端口不可以访问 解决办法

    localhost + 端口可以正常访问Manager APP,而IP + 端口不能访问Manager APP,报403错误.(我的主机环境是Ubuntu16.04) 前提是你已经配好了tomcat_ ...

  4. Tomcat8 访问 manager App 失败

    Tomcat8 访问 manager App 失败 进入 tomcat 8 的下面路径 修改 上面 的 context.xml 注释了下面的框框 保存退出.重启tomcat

  5. Tomcat 访问 Manager App,Host Manager

     1.启动tomcat,在浏览器输入:http://localhost:8080/ 2.配置tomcat-users.xml 文件 在主目录的cong文件夹下找到tomcat-users.xml 文件 ...

  6. Tomcat9 访问 Manager App

    1.介绍 在配置好Tomcat,我们往往需要访问Tomcat的Manager以及Host Manager.就需要在tomcat-users.xml中配置用户角色来实现.在地址栏输入:localhost ...

  7. tomcat管理员manager app无法进入解决方法

    浏览器输入http://localhost:8080/进入tomcat页面后,点击manager app输入用户名(admin)密码(admin)后页面跳转出现如下错误:备注:tomcat7.0.39 ...

  8. Tomcat的manager app管理web项目

    1.在浏览器地址栏输入http://localhost:8080/进入,如下图所示: 2.在点击Manager App 前,首次使用则需要对tomcat目录下的conf/tomcat-users.xm ...

  9. tomcat8 进入不了Manager App 界面 403 Access Denied

    准备 1.注释掉context.xml中的value属性 使用下面的命令: vim /usr/local/tomcats/tomcat-daily/webapps/manager/META-INF/c ...

随机推荐

  1. Spring bean加载2--FactoryBean情况处理

    Spring bean加载2--FactoryBean情况处理 在Spring bean加载过程中,每次bean实例在返回前都会调用getObjectForBeanInstance来处理Factory ...

  2. 保留注释换行的python模块configparser

    python语言用来解析配置文件的模块是ConfigParser,python3中是configparser模块,我在使用中发现write方法在将配置项重新写入文 件时,配置文件中的空行和注释行都会被 ...

  3. ZOJ2405 Specialized Four-Digit Numbers 2017-04-18 20:43 44人阅读 评论(0) 收藏

    Specialized Four-Digit Numbers Time Limit: 2 Seconds      Memory Limit: 65536 KB Find and list all f ...

  4. SPOJ10606 BALNUM - Balanced Numbers(数位DP+状压)

    Balanced numbers have been used by mathematicians for centuries. A positive integer is considered a ...

  5. onclick传参

    var tema="<a title='打开' href='javascript:;' onclick='showKnowledgeMap(1,\" "+kl_na ...

  6. java 把InputStream流写入到文件中

    基于流(Stream)的解决 流是单向的有方向性的描述信息流的对象,InputStream是输入流的接口,对程序来说是入,是读,可以从文件读,缓存区读,网络节点读等等. 写入文件,对程序来说是出,是写 ...

  7. Delphi 中 FindWindow 和 FindWindowEx 的语法和用法

    FindWindow(lpClassName,        {窗口的类名}lpWindowName: PChar {窗口的标题}): HWND;              {返回窗口的句柄; 失败返 ...

  8. C#——调用C++的DLL 数据类型转换

    /C++中的DLL函数原型为        //extern "C" __declspec(dllexport) bool 方法名一(const char* 变量名1, unsig ...

  9. C# 基础篇

    全篇依据 C#高级编程(第9版) 内容记录: 基础知识C# 5.0 基础 分为15章内容来介绍 核心C# 对象和类型 继承 泛型 数组 运算符和类型强制转换 委托和lambda表达式,事件 字符串和正 ...

  10. 浅谈.NET,C#三层架构(自己总结)

     三层架构 常见架构: 三层(经典) MVC MVVM MVP   开发中常见的23种设计模式: 创建型模式,共五种:工厂方法模式.抽象工厂模式.单例模式.建造者模式.原型模式. 结构型模式,共七种: ...