1. 程式人生 > >03-在tomcat部署網站多個網站

03-在tomcat部署網站多個網站

在Tomcat伺服器釋出兩個專案 CRM  OA

server.xml配置檔案

<Context docBase="C:\crm" path="/crm" />
<Context docBase="C:\oa" path="/oa" />

<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" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t "%r" %s %b" />
		<Context docBase="C:\crm" path="/crm" />
		<Context docBase="C:\oa" path="/oa" />
</Host>

 

儲存server.xml檔案,並重起服務,用瀏覽器來訪問這兩個專案