<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Thanks.. but i think you are not understanding me.. the problem is that the log line is throwing an error. So i cannot log.<br><br>This is the line that is throwing that error if ($log) { access_log /root/access-selected-slim.log slim; }<br>I have that line inside my server {} .. thats where i need it.<br><br><br>If i cant do it this way.. how can I do it then?<br><br>Mike<br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Sun, 25 Mar 2012 23:32:31 +0100<br>> From: francis@daoine.org<br>> To: nginx@nginx.org<br>> Subject: Re: "access_log" directive is not allowed here in... how to do this properly?<br>> <br>> On Sun, Mar 25, 2012 at 07:21:20PM +0000, Micheal Wolfskill wrote:<br>> <br>> Hi there,<br>> <br>> > Iam trying to log the requests coming from a list of countries into a seperate log file.. <br>> <br>> > map $geoip_country_code $log {<br>> > default 0;<br>> > CN 1; #"China"<br>> <br>> > }<br>> <br>> access_log logs/$log.log;<br>> <br>> You may want to make the content of $log be more descriptive: "access"<br>> and "special" instead of 0 and 1, for example.<br>> <br>> Or just log normally, and post-process the file to split based on the<br>> logged IP address.<br>> <br>> f<br>> -- <br>> Francis Daly francis@daoine.org<br>> <br>> _______________________________________________<br>> nginx mailing list<br>> nginx@nginx.org<br>> http://mailman.nginx.org/mailman/listinfo/nginx<br></div> </div></body>
</html>