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        [email protected]

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to