2 Replies Latest reply on Feb 7, 2008 9:08 AM by jaikiran

    "Failed to map vhost" and access logging

    zambak

      Hello

      I am trying to set up JBoss to perform access logging on some of the virtual hosts I have. Tomcat offers valves for this type of the job and I was successfull after I read

      http://wiki.jboss.org/wiki/Wiki.jsp?page=VirtualHosts

      However, Tomcat docs also mention that it is possible to deploy this information via META-INF/context.xmlfile which gives me "per application" granular control. If I try this then the JBoss complains with following message:


      2006-06-19 14:37:59,437 WARN [org.jboss.web.tomcat.tc5.TomcatDeployer] Failed to map vhost: webapp1.mydomain.org



      Is is possible to specify vhost information and access logging via META-INF/context.xml and if so could this be a bug?

      Here is the contents of my context.xml file:

      <Host name="webapp1.domain.org" autoDeploy="false" deployOnStartup="true" deployXML="true">
       <Alias>webapp1</Alias>
       <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
       prefix="webapp1.domain.org-"
       suffix="-access_log"
       pattern="combined"
       directory="/opt/jboss/server/all/log/access"
       rotatable="true"
       fileDateFormat="yyyy-MM-dd"
       resolveHosts="false" />
       </Host>


      The above works fine if I put it into /opt/jboss/server/all/deploy/jbossweb-tomcat55.sar/server.xml but not in my webapp's META-INF/context.xml