Loading ...
Sorry, an error occurred while loading the content.

Re: Browsers, Search Engines and Phrases -- where?

Expand Messages
  • enventa2000
    ... animals ... shows) ... ] First of all, you have to make sure that you have at the start of your httpd.conf the definition of the different log format
    Message 1 of 7 , Apr 20, 2004
    • 0 Attachment
      --- In webalizer@yahoogroups.com, "jlyandco" <jlyandco@y...> wrote:
      > May I ask you a question regarding the "Virtual Host" containers?
      > In my httpd.conf file, here is an example of what one of these
      > looks like:
      > ServerName wheelchairhouseco.com
      > ServerAlias wheelchairhouseco.com www.wheelchairhouseco.com
      > ServerAdmin junglrot@w...
      > DocumentRoot /usr/local/etc/httpd/htdocs/wheelchairhouseco
      > ErrorLog logs/wheelchairhouseco.com-error_log
      > TransferLog logs/wheelchairhouseco.com-access_log
      > </VIRTUALHOST>
      > There is NO reference in this "container" to either "common" or
      > "combined" log -- as you show in your attached (and wonderfully
      > insightful) explanation.
      > Is this something that I can modify (to reflect as your example
      > and it will begin capturing all of the access, error, agent and
      > referral information? Is there something else that I need to do?[...

      First of all, you have to make sure that you have at the start of your
      httpd.conf the definition of the different log format types. It should
      be like this:

      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}
      i\"" combined
      LogFormat "%h %l %u %t \"%r\" %>s %b" common
      LogFormat "%{Referer}i -> %U" referer
      LogFormat "%{User-agent}i" agent

      Notice the order in which the formats are defined. This is important.
      The last format is the "agent" format.

      In your file your using the TransferLog directive. It takes either the
      last format defined using LogFormat (in this case, the "agent" format)
      or, if no LogFormat directive is used, the common format, which is
      hard-coded somewhere inside the apache code.

      In this example TransferLog will create logs in "agent" format.

      You have two solutions:

      1: Move the LogFormat for "combined" so it is the last one being
      defined (you won't have to alter anything else in the file). Check
      these are the only LogFormat lines in the file.

      LogFormat "%h %l %u %t \"%r\" %>s %b" common
      LogFormat "%{Referer}i -> %U" referer
      LogFormat "%{User-agent}i" agent
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}
      i\"" combined

      2: Use the CustomLog directive (instead of TransferLog):

      CustomLog logs/wheelchairhouseco.com-access_log combined

      You'll need to substitute every TransferLog line per a CustomLog line.
      If you add the CustomLog and leave TransferLog in place, with the same
      file for both, then everything would be logged twice to the same file.

      (Remember that to use CustomLog you need to define the "combined"
      format before the CustomLog line. If you didn't alter the default
      configuration, it will be already defined.)
    Your message has been successfully submitted and would be delivered to recipients shortly.