Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: Apache CustomLog |
|
Author |
|
lacostewin
Joined: 21 Nov 2016 Posts: 1 Location: RUS
|
Posted: Mon 21 Nov '16 19:14 Post subject: Apache CustomLog |
|
|
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
|
Posted: Sat 26 Nov '16 10:44 Post subject: |
|
|
Code: | SetEnvIfNoCase User-Agent "^Baiduspider" botlog |
|
|
Back to top |
|
|
|
|
|
|