LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   General (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=25)
-   -   [solved] Apache VHost GEOIP Country logging (http://www.litespeedtech.com/support/forum/showthread.php?t=6608)

poirot 01-29-2013 09:39 AM

[solved] Apache VHost GEOIP Country logging
 
Hi,

We've a DirectAdmin based LiteSpeed setup where for one vhost we need to create
a custom LogFormat rule logging also the country code of every request from
MaxMind's GEOIP module attached to LSWS natively.
What's the correct enviroment variable to use withing httpd.conf to log such information?
I've tried many different options:
%{ENV:GEOIP_COUNTRY_CODE}, %{GEOIP_COUNTRY_CODE} and so on...
but nothing seems to work.

webizen 01-29-2013 12:51 PM

pls be more specific to what you would like to achieve (better with an example). you mean have webserver output GEOIP related variable into the server log? can you do that in Apache?

NiteWave 01-29-2013 06:34 PM

Quote:

I've tried many different options:
%{ENV:GEOIP_COUNTRY_CODE}, %{GEOIP_COUNTRY_CODE} and so on...
but nothing seems to work.
per http://httpd.apache.org/docs/2.2/mod...og_config.html
should be
%{GEOIP_COUNTRY_CODE}e

litespeed already support it, please confirm or test

poirot 01-30-2013 07:49 AM

@Webizen: Yes. I want to log visitors country code at the end of each log entry.
@NiteWave: Thank you. Works fine.


All times are GMT -7. The time now is 06:59 PM.