首页 > 解决方案 > 如何通过本地计算机远程连接 Apache 服务器(http://149.4.223.238:8080)

问题描述

我将 Eclipse 与 Tomcat 8.0 一起使用,并成功运行 Web 应用程序并将其部署到 Apache 服务器中。现在我的问题是如何访问在线 apache 主机地址应用程序管理器,以便在此主机上部署我的应用程序删除服务器地址

tomcat_users.xml

<tomcat-users>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>   
<user username="tom" password="tom123" roles="admin-gui"/>
<user username="malik" password="malik123" roles="manager-gui,manager-script,manager-jmx,manager-status"/>

</<tomcat-users>

我将此添加到 server.xml

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" address="149.4.223.238" redirectPort="8443"/>

上下文.xml

<Context antiResourceLocking="false" privileged="true" >
  <!--
    Remove the comment markers from around the Valve below to limit access to
    the manager application to clients connecting from localhost
  -->

  <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="149\.4\.223\.238|127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />

 </Context>

我正在搜索过去 5-7 个小时,但仍然不明白。

标签: javaeclipseapacheserverhost

解决方案


http://149.4.223.238:8080/manager/html

看起来你可能还没有配置它。该链接还告诉您如何设置它。此外,如果您远程连接该机器并通过 localhost:8080/manager/html 访问该站点,那也应该可以工作。

更多细节在

https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html


推荐阅读