HTTP State Management with Cookies - Web Server Cookie Support
(Page 5 of 5 )
Apache, the major web server, provides transparent support for basic cookie functionality. With appropriate configuration and management, it has the capability to go beyond this, providing more sophisticated functionality that takes greater advantage of the power of cookies to provide detailed and useful information.
In order to work with cookies, Apache must be correctly configured. This is done by loading the mod_usertrack module. Apache's configuration file, httpd.conf, contains the relevant code to do this, but the appropriate lines may need to be uncommented. The lines to look for are:
LoadModuleusertrack_module modules/mod_usertrack.so
AddModulemod_usertrack.c
Once cookie tracking has been enabled, further configuration is necessary to specify the cookie name, format, duration, and whether cookie tracking is required. A log file can also be specified in httpd.conf where cookie tracking data will be stored. Now each time a client request is made, corresponding log entries will enable the retrieval of information such as:
Frequency and duration of visits by specific clients.
User activity, such as clicks, pages and links visited.
User time spent on specific pages.
Collective user activity over particular time periods. For example, on what days and times was certain content most popular
Relative popularity of content: which pages were visited most often and for the longest time periods.
It is also easy to identify behavior that diverges significantly from the norm, which can be instructive in itself.
System administrators should also be aware of the possible security implications of cookies, and how to set up Apache to guard against possible intrusions. This can be a relatively complex process, which is the subject of another article.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |