question about access.log from apache2

Discussion in 'General' started by Ovidiu, Oct 24, 2005.

  1. Ovidiu

    Ovidiu Active Member

    hi guys,

    I found/var/log/apache2 which contains recent error.log but no access.log only an old version.

    shouldn't it be there? I had a look inside my /etc/apache2/apache2 cfg file and found donly the logging for ispconfig is defined. Is that normal that I have to define it manually?

    how would the line look to add an access.log for all the apache2 traffic ? I see the line for ispconfig log file is using cronolog, can I just copy that and modify the location (target) ?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You could use
    Code:
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    CustomLog /var/log/apache/access.log combined
    in your main Apache configuration (you have to restart Apache after your changes).
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Why logging the traffic twice when ISPConfig already loggs the hits and splits them on a per vhost basis? If your server gets more traffic its not a good idea to burden apache with more logs then absolutely nescessary.
     
  4. Ovidiu

    Ovidiu Active Member

    till you are right, I had the same idea but I was away and the post was posted. remember I asked you about the same thing in this post http://www.howtoforge.com/forums/showthread.php?t=825 because I wanted to run webalizer on the whole serevr access log; I guess I was just shocked not to find the apache logs where I was expecting them ;-) of course I can use the logs generated for ispconfig
     
  5. Ovidiu

    Ovidiu Active Member

    am I right that there is no central logfile? I need to point a tool to the logfile and I need to enter a name. If the logfile would always have the same name and just get rotated weekly or daily or whatever that would be fine but it seems that the logfile always has the date appended, is that right?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    The central logfile should be /var/log/apache/access.log or /var/log/httpd/access.log...
     
  7. Ovidiu

    Ovidiu Active Member

    in /var/log/httpd/ there are only the log files from/for ISPcfg which are already split for each day and in /var/log/apache/ there is an access.log which is 0-sized.
    Also I don't know where this file comes from as there is only one directive in the apache2 cfg file telling it to create the ispcfg logfile...
    so I need to tell apache2 to create one, right?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Ify you cabt work withthe splitted logfiles from ISPConfig yo will have to create your oen logfile. Dont forget to rotate it ;)
     

Share This Page