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.

how to configure apache to update access_logs files in the real time

Discussion in 'Apache' started by moath11, Jul 19, 2014.

  1. #2
    Hello World

    i'm trying to configure an custom access_log file for an custom file called "extra.php"

    how i can make an log file that's log only "extra.php"


    thanks
     
    Last edited: Jul 19, 2014
    moath11, Jul 19, 2014 IP
  2. DaiTengu

    DaiTengu Active Member

    Messages:
    49
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    75
    #3
    Not that I'm aware of. Your best bet is to probably tail the access_log, pipe it through grep, and output it to another file.

    Something like:
     tail -f access_log | grep extra.php > extra.php_access_log
    Code (markup):
    You can, of course, pull all the past data out of access_log by doing the same thing with cat.

    cat access_log | grep extra.php > extra.php_access_log
    Code (markup):
    Keep in mind that ">" will overwrite the file, so if you want to do "cat" first, use >> when you tail the log output.
     
    DaiTengu, Jul 20, 2014 IP