zoukankan      html  css  js  c++  java
  • tomcat下配置多端口,多项目

    --1.tomcat7默认的

    <Service name="Catalina">

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

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>

    <Engine defaultHost="localhost" name="Catalina">

    <Realm className="org.apache.catalina.realm.LockOutRealm">

    <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
    </Realm>

    <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b" prefix="localhost_access_log." suffix=".txt"/>

    <Context docBase="F:\tomcat\apache-tomcat-7.0.88\wtpwebapps\Test1" path="/Test1" reloadable="true" source="org.eclipse.jst.jee.server:Test1"/></Host>
    </Engine>
    </Service>

    --2 配置的在不同文件夹下不同端口的不同项目

    <Service name="Catalina2">
    <Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort="8443" />
    <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
    <Engine defaultHost="localhost" name="Catalina2">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
    <Host appBase="webapps2" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
    <Context path="/test2" reloadable="true" docBase="/home/xb/tomcat7/webapps2/项目名称"></Context>
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
    prefix="localhost_access_log2_" suffix=".txt"
    pattern="%h %l %u %t &quot;%r&quot; %s %b" />
    </Host>
    </Engine>
    </Service>

  • 相关阅读:
    Liunx-----Shell脚本流程控制--顺序、选择、循环
    oracle基本查询
    Shell脚本练习题
    Shell脚本:选择结构、循环结构、
    Shell脚本
    Linux的基本命令
    动态页面技术(JSP/EL/JSTL)
    小功能:访问页面距上次访问有多久时间
    添加验证码,并验证验证码是否正确
    注册,登陆的Servlet、dao、service、domain、jsp页面、
  • 原文地址:https://www.cnblogs.com/xielinjiang/p/9150056.html
Copyright © 2011-2022 走看看