tomcat 服务器设置默认启动页面

在conf文件夹下找开server.xml
修改Host节点下添加:如下图

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

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
	    <Context path="" docBase="C:/Server/apache-tomcat-8.5.57/webapps/mbts_27_elearn/" debug="0"/>
        <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>

docBase中的路径就是项目的要根目录

猜你喜欢

转载自blog.csdn.net/weixin_41743629/article/details/117708715
今日推荐