• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Apache, httpd.conf, trying to log cookies

B

bona fide

Guest
I'm trying to get cookies in the Apache log files, but it isn't working.

/etc/httpd/conf/httpd.conf contains:
LoadModule usertrack_module modules/mod_usertrack.so
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" combined
CustomLog logs/access_log combined

.htaccess contains:
CookieTracking On
CookieExpires "5 years"
CookieName "mycookie"

and I've restarted Apache via:
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start

but nada in access_log. I've tried modifying vhost.conf too.

Am I missing a typo, or what?

Thanks!
 
Finally figured this out. The cookies were getting written to the client, and were getting passed. The issue had to do with the Apache configuration. Coding the following specific fpointer to the log file in vhost.conf fixed it:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" combined
CustomLog /home/httpd/vhosts/mydomain.com/statistics/logs/access_log combined

Dear SWsoft: Please please please document the relationship between httpd.conf, httpd.include, and vhost.conf, and how to manage the location and contents of the log files. This took hours upon hours of experimentation and research.
 
Back
Top