Apache Web Server Logs

Article:TECH94290  |  Created: 2009-01-01  |  Updated: 2012-03-08  |  Article URL http://www.symantec.com/docs/TECH94290
Article Type
Technical Solution


Environment

Issue



How to generate Apache communication Logs

 


Cause



By default Apache Server generates only Error logs


Solution



There are mainly 2 types of logs in Apache Web Server. By default Error log is enabled/ON.
 

    1. Error log

      LOGLEVEL
      SIGNIFICANCE OF ERROR

      emerg System is unstable
      alert
      Immediate action required
      crit
      Critical error
      error
      Non-critical error
      warn (Default)
      Warning
      notice
      Normal but significant
      info
      Informational
      debug
      Debug level

       
    2. Access Log. (Transactions between Client and Manager will be logged)

      There are two Access log level types: Common and Combined

      How to enable the Access log:
      1. Navigate to:

        C:\Program Files\Symantec\Symantec Protection Center\apache\conf

         
      2. Open httpd.conf in Notepad
      3. Search for/locate the following line in the file:

        #CustomLog "logs/access.log" combined

         
      4. Remove the # so that the line reads as follows:

        CustomLog "logs/access.log" combined

         
      5. Restart Symantec Protection Center Webserver Services:
        1. Click Start, then Run
        2. Type the following:

          services.msc

           
        3. Click OK
        4. Right-click on Symantec Protection Center Webserver
        5. Click Restart
        6. Click Yes



The error.log and access.log can be found in the following location:

    C:\Program Files\Symantec\Symantec Protection Center\apache\logs



References
http://www.devshed.com/c/a/Apache/Logging-in-Apache/

http://httpd.apache.org/docs/2.0/logs.html


Technical Information
-Common log


Output:-
e.g.
127.0.0.1 - harry [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326

-Combined log

Output:-
e.g.
127.0.0.1 - harry [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"

This format is exactly the same as the Common Log Format, with the addition of two more fields. Each of the additional fields uses the percent-directive %{header}i, where header can be any HTTP request header.


 




Legacy ID



2009060115321248


Article URL http://www.symantec.com/docs/TECH94290


Terms of use for this information are found in Legal Notices