Blocking user behind proxy
sameer
nginx-forum at nginx.us
Tue Oct 20 16:34:09 MSD 2009
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;
}
}
geo $http_true_client_ip $forbidden {
default no;
121.243.22.187 0;
}
if ($forbidden) {
return 403;
}
I tried the geo directive inside the server section and during the config check I keep getting an error
: "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
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,13912,15190#msg-15190
More information about the nginx
mailing list