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.

Apache 2.4 how to exclude certain GET requests from log using SetEnvIf

Discussion in 'Apache' started by Sarge2018, Nov 15, 2018.

  1. #1
    Spent some time with docs and Google but did not find any real example for that.

    I want to exclude from logging many unnecessary lines like that

    83.266.84.27--[27/Oct/2018:14:07:19-0500]"GET example.com/mod/maxtop.php HTTP/1.1"2003412"http://example.com/page218.html""Mozilla/5.0 (Windows NT 10.0; rv:56.0) Gecko/20100101 Firefox/56.0"

    I tried
    SetEnvIfRequest_Method GET "^/maxtop\.php$" dontlog
    and
    SetEnvIfRequest_Method"GET(.*)/maxtop\.php$" dontlog
    ...but no success.

    Thx for any hint what else to try (if Apache GET exclude by regex at all possible...)
     
    Sarge2018, Nov 15, 2018 IP