码迷,mamicode.com
首页 > Web开发 > 详细

只输入域名就访问网站

时间:2017-07-11 20:59:37      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:ada   ros   prot   访问   输入   地址   auto   ctp   style   

<Host name="www.XXX.com"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context path="" docBase="/usr/java/tomcat/webapps/项目名" debug="0"  reloadable="false" crossContext="true"/>
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      </Host>

      <Host name="IP地址"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context path="" docBase="/usr/java/tomcat/webapps/项目名" debug="0"  reloadable="false" crossContext="true"/>
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      </Host>

      <Host name="admin.XXX.com"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context path="" docBase="/usr/java/tomcat/webapps/项目名" debug="0"  reloadable="false" crossContext="true"/>
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      </Host>

二:将端口修改为80

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

 

只输入域名就访问网站

标签:ada   ros   prot   访问   输入   地址   auto   ctp   style   

原文地址:http://www.cnblogs.com/-scl/p/7152203.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!