tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Diedler <adied...@tecracer.de>
Subject BestPractise Multiple Webapps
Date Wed, 03 Feb 2010 11:19:36 GMT
Hello,
We have 3 different webapps based on d:\tomcat_apps\app1 ... app2 .... App3 on a Apache 2.2.14
and Tomcat 6.0.20.
We want to have the possibility to reload every context/webapp separately without impact the
others.

So we have to open http://www.app1.de/manager/html/  to restart context for webapp1
So we have to open http://www.app2.de/manager/html/  to restart context for webapp2
So we have to open http://www.app3.de/manager/html/  to restart context for webapp3
It is possible to impact all these webapps into one manager app and restart contexts? But
remember, in the Browser the user have to fill-in http://www.app1.de/ instead of http://www.app1.de/apps1


So we create in httpd-vhosts three VirtualHosts:

http.conf:
LoadModule jk_module modules/mod_jk.so

JkWorkersFile conf/worker.properties
JkLogFile mod_jk.log
# LEvel error|warn|debug
JkLogLevel warn

========================
Worker.properties
worker.list=worker1
worker.worker1.port=8010
worker.worker1.host=k0.domain.local
worker.worker1.type=ajp13
worker.worker1.lbfactor=100
worker.worker1.route=worker1
worker.worker1.activation=active

=========================
Httpd-vhosts.conf

#app1
<VirtualHost *:80>
    ServerAdmin info@sss.de
    DocumentRoot "D:\tomcat_apps\app1"
    ServerName k0.domain.local
    JkMount /* worker1
</VirtualHost>

#app2
<VirtualHost *:80>
    ServerAdmin info@sss.de
    DocumentRoot "D:\tomcat_apps\app2"
    ServerName k0.domain.local
    JkMount /* worker1
</VirtualHost>

#app3
<VirtualHost *:80>
    ServerAdmin info@sss.de
    DocumentRoot "D:\tomcat_apps\app3"
    ServerName k0.domain.local
    JkMount /* worker1
</VirtualHost>


SERVER.XML
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
 </Host>

<Host name="app1" appBase="app1">
                <Alias>www.app1.de</Alias>
                <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="app1_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
</Host>

<Host name="app2" appBase="app2">
<Alias>www.app2.de</Alias>
                <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="app2_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
</Host>

<Host name="app3"  appBase="app3">
                <Alias>www.app3.de</Alias>
                <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="app3_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
</Host>


[Tomcat_HOME]
/conf/Cartalina/app1/
                ROOT.xml
                Manager.xml
Content ROOT.xml:
<Context path="/" reloadable="true" docBase="D:\tomcat_apps\app1">
</Context>
Content manager.xml:
<Context docBase="${catalina.home}/webapps/manager"
         privileged="true" antiResourceLocking="false" antiJARLocking="false">
                               <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1"/>
</Context>


/conf/Cartalina/app2/
                ROOT.xml
                Manager.xml
Content ROOT.xml:
<Context path="/" reloadable="true" docBase="D:\tomcat_apps\app2">
</Context>
Content manager.xml:
<Context docBase="${catalina.home}/webapps/manager"
         privileged="true" antiResourceLocking="false" antiJARLocking="false">
                               <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1"/>
</Context>




/conf/Cartalina/app3/
                ROOT.xml
                Manager.xml
Content ROOT.xml:
<Context path="/" reloadable="true" docBase="D:\tomcat_apps\app3">
</Context>
Content manager.xml:
<Context docBase="${catalina.home}/webapps/manager"
         privileged="true" antiResourceLocking="false" antiJARLocking="false">
                               <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1"/>
</Context>



/conf/Cartalina/localhost/
                Manager.xml
Content manager.xml:
<Context docBase="${catalina.home}/webapps/manager"
         privileged="true" antiResourceLocking="false" antiJARLocking="false">
                               <Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1"/>
</Context>



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message