How to log GoogleBot useragent in its own access log?

Luca De Marinis loop at
Thu Mar 4 13:05:03 MSK 2010

On Thu, Mar 4, 2010 at 9:22 AM, Phillip Oldham <phill at> wrote:

> On 03/03/2010 22:12, David Taveras wrote:
>> Would it be possible to match if the useragent contains this string
>> "+"  and log it in a specific file
>> for googles crawling?
> Have you tried just using an if statement? Something like...

If the docs are right, this is not going to work. acces_log is only valid
within http, server, location;
rewriting urls for a specific location when the user agent matches, and then
defining a custom log there should work.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list