aspose file tools*
The moose likes Tomcat and the fly likes Multiple web applications, one virtual host, access logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Multiple web applications, one virtual host, access logging" Watch "Multiple web applications, one virtual host, access logging" New topic
Author

Multiple web applications, one virtual host, access logging

Monica Riggins
Greenhorn

Joined: Oct 31, 2006
Posts: 1
Hello everyone,

I am attempting to create access logs on a per web application basis,
using a single virtual host in my server.xml file. Here is what I
have:


<Host name="www.mysite.com" autoDeploy="false"
deployOnStartup="false" deployXML="false">
<alias>www.mysite.com</alias>
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="mysite_access" suffix=".log" pattern="common"
directory="${jboss.server.home.dir}/log"/>
<Context path="" docBase="html" debug="0" reloadable="true"/>
<DefaultContext cookies="true" crossContext="true" override="true"/>
<Context path="/Web1" docBase="C:\jboss-4.0.1RC2\server\default
\deploy" debug="0" reloadable="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.home.dir}/log" prefix="my_web1" suffix=".log" resolveHosts="false" pattern="combined"/
</Context>
<Context path="/images" appBase="" docBase="C:\jboss-4.0.1RC2\server\default\images" debug="99">
</Context>
<Context path="/Web2" docBase="C:\jboss-4.0.1RC\server\default\deploy" debug="0" reloadable="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="${jboss.server.home.dir}/log" prefix="my_web2" suffix=".log" resolveHosts="false" pattern="combined"/
</Context>
</Host>

Everything is working as it should, the my_web1.log and my_web2.log files are being created. The problem is that when I hit www.mysite.com/Web1 or www.mysite.com/Web2 the only log that gets updated is mysite_access.log.


Can someone please explain to me how to go about writing to the my_web1.log and my_web2.log files for those applications?


Thanks,
Monica
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple web applications, one virtual host, access logging
 
Similar Threads
apache2/tomcat5/mod_jk2 problem
How to Define web context in JBoss other then using war file??
Tomcat alias does not load website
server.xml - FileLogger and Valve
Tomcat Configuration - context woes?