logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache CustomLog
Author
lacostewin



Joined: 21 Nov 2016
Posts: 1
Location: RUS

PostPosted: Mon 21 Nov '16 19:14    Post subject: Apache CustomLog Reply with quote

Good day!

I have a problem with Apache's log. Apache has Virtual host and alias. Eg, site.ru and site.ru/forum So, I want to get three files of log:

SetEnvIf User-agent "bot|baidu" botlog
SetEnvIf User-agent "bot|Favicon" botlog

SetEnvIf Request_URI "^/cacti/*" cacti

CustomLog ${APACHE_LOG_DIR}/access-nef.log combined env=[!cacti,!botlog]

CustomLog ${APACHE_LOG_DIR}/access-cacti.log combined env=cacti

CustomLog ${APACHE_LOG_DIR}/bot-nef.log combined env=botlog

Files access-cacti.log and bot-nef.log contain correct writes, but file access-nef.log is empty.

What am I doing wrong

Thanks!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 26 Nov '16 10:44    Post subject: Reply with quote

Code:
SetEnvIfNoCase User-Agent "^Baiduspider" botlog
Back to top


Reply to topic   Topic: Apache CustomLog View previous topic :: View next topic
Post new topic   Forum Index -> Apache