Welcome! Log In Create A New Profile

Advanced

Re: how to separate robot access log and human access log

Francis Daly
May 05, 2015 01:50PM
On Tue, May 05, 2015 at 08:20:35AM -0400, meteor8488 wrote:

Hi there,

> if $spiderbot=0, then log to location_access.log

Set a variable which is non-zero when $spiderbot=0, and which is zero
or blank otherwise. Use that as the access_log if=$variable for
location_access.log.

> if $spiderbot=1, then log to spider_access.log.

Set a variable which is non-zero when $spiderbot=1, and which is zero
or blank otherwise. ($spiderbot is probably perfect for this as-is.) Use
that as the access_log if=$variable for spider_access.log.

> And I don't want the same logs write to different files.

For each loggable request, make sure that exactly one of your if=$variable
variables is non-zero.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to separate robot access log and human access log

meteor8488 April 27, 2015 07:45PM

Re: how to separate robot access log and human access log

Francis Daly April 30, 2015 01:46PM

Re: how to separate robot access log and human access log

meteor8488 May 05, 2015 08:20AM

Re: how to separate robot access log and human access log

Francis Daly May 05, 2015 01:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 219
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready