欢迎加入站点基地设计开发交流群:30720409
详细内容
关于设置tomcat域名访问和默认页面的说明
发布日期:2010-03-05     点击:6816     字体:[ ]

1.域名访问

打开tomcat安装目录下的conf文件夹,找到server.xml

修改内容:

      <Host name="localhost" appBase="webapps/ROOT/zdBase"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

将localhost换成IP地址或域名,申请了域名后解析至该name即可

appBase是项目所在目录,网站文件均放置在该文件夹,修改下面语句

<Context path="/ROOT/zdBase" reloadable="true" docBase="." workDir="E:\Exploitation\tomcat\webapps\ROOT\zdBase\work"/>

此处的path对应上面的appBase

2.默认页面

打开tomcat安装目录下的conf文件夹,找到web.xml

在下面添加你需要的首页即可。

<welcome-file-list>
        <welcome-file>login.html</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

用户评论
昵称 
内容  *
验证码   
   
相关文章 更多...  
Copyright © 2010 zdbase.com All Rights Reserved. 苏ICP备15039389号-1 可人软件设计