1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Apache, httpd.conf, trying to log cookies

Discussion in 'Plesk for Linux - 8.x and Older' started by bona fide, Sep 24, 2005.

  1. bona fide

    bona fide Guest

    0
     
    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!
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
  3. bona fide

    bona fide Guest

    0
     
  4. bona fide

    bona fide Guest

    0
     
    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.
     
Loading...