<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'>
Hello !<br><br>Iam trying to log the requests coming from a list of countries into a seperate log file.. Iam using the config below... BUt iam getting this error: <br><br>[emerg]: "access_log" directive is not allowed here in /etc/nginx/nginx.conf:55<br>configuration file /etc/nginx/nginx.conf test failed<br><br>How could I accomplish what iam trying to do?<br><br>Thanks!<br><br>--Mike<br><br><br>http {<br>         ......<br>         .......<br><br>geoip_country  /etc/nginx/GeoIP.dat; <br>       <br>map $geoip_country_code $log {<br>                        default       0;<br>                        CN 1; #"China"<br>                        RO 1; #"Romania"<br>                        IQ 1; #"Iraq"<br>                        IR 1; #"Iran<br>                        HK 1; #"Hong Kong"<br>                        IN 1; #"India"<br>                        }<br><br>        server {<br>                listen   80;<br>                server_name  domain.com;<br>                .....<br>                .....<br>                if ($log) { access_log  /root/access-selected-slim.log; }<br>                location / { proxy_pass http://12.163.169.32:80/;  }<br><br>                }<br>     }<br><br>                                     </div></body>
</html>