Re: apache virtual hosting + server.xml + context
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
RE: apache virtual hosting + server.xml + context
From: sudip shrestha [mailto:[EMAIL PROTECTED] Subject: Re: apache virtual hosting + server.xml + context 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 Which is exactly as it's defined to work. You should only have one instance for each unique Context element, otherwise you will get multiple deployments and corresponding initializations. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: apache virtual hosting + server.xml + context [255643:132138]
Many thanks for your email. This is an automated response acknowledging receipt. Please be advised that Badge mailing commences beginning of October 2005. Should your message require a response we will respond shortly. Regards Meridian Club -Original Message- From: gianni dalmasso [EMAIL PROTECTED] Received: 10/7/2005 10:51 AM To: tomcat-user@jakarta.apache.org Subject: apache virtual hosting + server.xml + context 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 /VirtualHost VirtualHost xx.yy.zz.kk:80 Directory /var/www/html/aaa DirectoryIndex index.htm index.html index.jsp /Directory ServerName 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 DocumentRoot /var/jakarta-tomcat-5.5.9/webapps/bbb JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 /VirtualHost SERVER.XML Host name=www.aaa.com Context path= docBase=/var/www/html/aaa debug=0 reloadable=true /Context /Host Host name=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 appBase = /var/www/html/aaa (or similar... ) /Host Host name=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 -- Meridian Club Unit 5, Caxton Centre Porters Wood St Albans Herts UNITED KINGDOM AL3 6XT Tel: +44 1727 738855 Fax: +44 1700 578955 email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]