1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CustomLog Problem - no logs get written

Discussion in 'Apache' started by Qwerty123, Dec 20, 2006.

  1. #1
    Hi everyone,

    I can't seem to get custom logs working at all.

    in /etc/apache2/apache2.conf I have these two lines (for example):
    LogFormat "%h %l" custom123
    CustomLog /var/www/testlog.log custom123

    The funny thing is, is that nothing gets written to this file, while everything is being correctly logged in the standard /var/log/apache2/access and error.

    b.t.w, apache restart without any errors, and if the file testlog.log does not exist, it is created.

    Also I've noticed that if I run "apache2", I get:
    (98)Address already in use: make_sock: could not bind to address [::]:80
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs


    Does anyone know what might be wrong?
     
    Qwerty123, Dec 20, 2006 IP
  2. ThreeGuineaWatch

    ThreeGuineaWatch Well-Known Member

    Messages:
    1,489
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    140
    #2
    What does

    % /usr/local/sbin/apachectl configtest

    say?


    Have you checked to see what is binding to port 80?
     
    ThreeGuineaWatch, Dec 20, 2006 IP
  3. Qwerty123

    Qwerty123 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the reply

    the command "apache2ctl configtest"
    gives:
    Syntax OK


    apache2 is bound to port 80
    netstat -apn --tcp
    tcp6 0 0 :::80 :::* LISTEN 14670/apache2


    apart from this, apache works perfectly.
     
    Qwerty123, Dec 21, 2006 IP