[code]
server {
listen 80 default;
server_name www.foo-bar.com;
location / {
real_ip_header True-Client-IP;
error_log logs/error.log;
access_log logs/access.log main;
deny 121.243.22.187;
root /usr/local/apache/htdocs;
}
}
[/code]
[code]
geo $http_true_client_ip $forbidden {
default no;
121.243.22.187 0;
}
if ($forbidden) {
return 403;
}
[/code]
I tried the geo directive inside the server section and during the config check I keep getting an error
[emerg]: "geo" directive is not allowed here in /usr/local/nginx/conf/nginx.conf
I tried recompiling --with-http_geo_module and got an error.
Using nginx version 0.7.62
Sameer