"access_log" directive is not allowed here in... how to do this properly?

Francis Daly francis at daoine.org
Sun Mar 25 22:32:31 UTC 2012


On Sun, Mar 25, 2012 at 07:21:20PM +0000, Micheal Wolfskill wrote:

Hi there,

> Iam trying to log the requests coming from a list of countries into a seperate log file.. 

> map $geoip_country_code $log {
>                         default       0;
>                         CN 1; #"China"

>                         }

        access_log logs/$log.log;

You may want to make the content of $log be more descriptive: "access"
and "special" instead of 0 and 1, for example.

Or just log normally, and post-process the file to split based on the
logged IP address.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list