We are having the similar problem, but if we place context in server.xml, ( I also have a META-INF/context.xml ) and as we are using dbcp connection pool, and it seems that tomcat initializes those pool twice....
On 10/7/05, gianni dalmasso <[EMAIL PROTECTED]> wrote: > > hi list, i have a problem. i have apache 2.0 + tomcat 5.5. > i have N name based virtual hosts on the same machine managed by apache; > some of them need to use tomcat (have jsp pages and servlets...) > if i set a server.xml of tomcat with several hosts, and every host has ist > context --> it's ok ( but tomcat documentation says "Please note that for > tomcat 5, unlike tomcat 4.x, it is NOT recommended to place <Context> > elements directly in the server.xml file") > if i try to move the context informations in a .xml file in a > $CATALINA_HOME/conf/[enginename]/[hostname]/ directory, tomcat cannot serve > anything (it acts as he cannot find files in docBase); > - which is the right configuration ? > - is it necessary to define different host in server.xml ?(--> so, when i > add a new host i need to restart apache and tomcat...) > thanks in advance > > here is the configuration that works.. > > HTTPD.CONF > .... > Include /var/jakarta-tomcat-5.5.9/conf/mod_jk.conf > > MOD_JK.CONF > ..... > > NameVirtualHost xx.yy.zz.kk:80 > > <VirtualHost xx.yy.zz.kk:80> > > DocumentRoot /var/www/html > > ServerName web.ccc.com <http://web.ccc.com> > > </VirtualHost> > > > > <VirtualHost xx.yy.zz.kk:80> > > <Directory "/var/www/html/aaa" > > > DirectoryIndex index.htm index.html index.jsp > > </Directory> > > ServerName www.aaa.com <http://www.aaa.com> > > DocumentRoot /var/www/html/aaa > > JkMount /*.jsp ajp13 > > JkMount /servlet/* ajp13 > > </VirtualHost> > > > > <VirtualHost xx.yy.zz.kk:80> > > <Directory "/var/jakarta-tomcat-5.5.9/webapps/bbb" > > > DirectoryIndex index.htm index.html > > </Directory> > > ServerName www.bbb.com <http://www.bbb.com> > > DocumentRoot /var/jakarta-tomcat-5.5.9/webapps/bbb > > JkMount /*.jsp ajp13 > > JkMount /servlet/* ajp13 > > </VirtualHost> > > > > SERVER.XML > > .... > > <Host name="www.aaa.com <http://www.aaa.com>"> > > <Context path="" > > docBase="/var/www/html/aaa" > > debug="0" > > reloadable="true" > > > </Context> > > </Host> > > > > <Host name="www.bbb.com <http://www.bbb.com>"> > > <Context path="" > > docBase="/var/jakarta-tomcat-5.5.9/webapps/bbb" > > debug="0" > > reloadable="true" > > > </Context> > > </Host> > > > > > ---------------------------------------------------------------------------------------- > > > > This for example, don't work > > > > setting : > > SERVER.XML > > > > .... > > <Host name="www.aaa.com <http://www.aaa.com>"> > > appBase = /var/www/html/aaa (or similar... ) > > </Host> > > > > <Host name="www.bbb.com <http://www.bbb.com>"> > > </Host> > > > the file : $CATALINA_HOME/conf/Catalina/www.aaa.com/aaa.xml > > <Context path="" > > docBase="/var/www/html/aaa" > > debug="0" > > reloadable="true" > > > </Context> > > > > > > > > --------------------------------- > Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3 >