1 Reply Latest reply on Oct 4, 2004 5:22 PM by brian_a

    Virtual Hosts not Logging

    brian_a Newbie

      Hi,

      I'm running JBoss 4.0 and am having an issue with one of my virtual hosts not logging. It isnt logging under its own logging file or under the localhost logging file. The odd part is that its creating the log file under the correct directory as specified by Valve directory, it just isnt populating it with the logging information. Any help would be greatly appreciated. :)

      My configuration follows:

      jbossweb-tomcat50.sar\server.xml:

       <Host name="CResHost">
       <Alias>sample.com</Alias>
       <Alias>www.sample.com</Alias>
       <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="sample_" suffix=".log" pattern="common" directory="${home.base}/log/sample"/>
       <DefaultContext cookies="true" crossContext="true" override="true"/>
       </Host>
      


      war file's WEB-INF/jboss-web.xml:
       <!-- Context Root -->
       <context-root>/</context-root>
      
       <!-- Deploy to CResHost -->
       <virtual-host>sample.com</virtual-host>
       <virtual-host>www.sample.com</virtual-host>
      </jboss-web>
      


        • 1. Re: Virtual Hosts not Logging
          brian_a Newbie

          Follow-up:

          It appears that whatever host matches the will get logged; however, all aliases continue to work but get ignored with logging.

          Example:

          <Host name="sample.com">
           <Alias>sample.com</Alias>
           <Alias>www.sample.com</Alias>
           <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="sample_" suffix=".log" pattern="common" directory="${home.base}/log/sample"/>
           <DefaultContext cookies="true" crossContext="true" override="true"/>
          </Host>


          Going to sample.com with your browser will direct to the correct deployment and creates a log entry. However, directing the browser to www.sample.com will direct to the correct deployment but will not get logged.

          Any thoughts?