![Alves908](https://vmapp.org/images/player/000default.jpg)
: Apache logging based on user agent I'd like to update my apache logging so that its destination is based on the user agent string or file type. Specifically, I would like to send my googlebot
I'd like to update my apache logging so that its destination is based on the user agent string or file type.
Specifically, I would like to send my googlebot requests to their own log file, and I would like to not log requests for any of my image files.
My configuration is pretty much stock.
More posts by @Alves908
1 Comments
Sorted by latest first Latest Oldest Best
Try adding something like the following into your VirtualHost config:
SetEnvIf User-agent .*Googlebot.* googlebot
CustomLog /var/log/apache2/access_googlebot.log combined env=googlebot
CustomLog /var/log/apache2/access.log combined env=!googlebot
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.