• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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