Updated January 26, 2019
Overview
This article documents how to enable logging in Apache Tomcat and create a localhost_access_log.txt file. This feature is disabled by default.
Web Help Desk may overwrite the tomcat_server_template.xml file when you update the software. Apply the steps in this article after each update.
Environment
All WHD versions
Steps
- Log in to the Web Help Desk server as an administrator.
- Stop Web Help Desk
- Navigate to <WebHelpDesk\conf.
- Open the tomcat_server_template.xml file in a text editor (such as Notepad).
- Locate and uncomment the following code:
className="org.apache.catalina.valves.AccessLogValve"
directory="../../log"
prefix="localhost_access_log"
pattern="common"
resolveHosts="false"
/>
The directory should be /log.
For additional detail, set the pattern parameter to combined. This value generates log that charting utilities (such as awstats) can understand.
- Start Web Help Desk.
- Navigate to <WebHelpDesk>\log,
This directory contains the localhost_access_log.txt file. Open the file in a text editor to view the logging.