Blocking user behind proxy

sameer nginx-forum at
Tue Oct 20 16:34:09 MSD 2009

server {
        listen 80 default;
        location / {
                real_ip_header True-Client-IP;
                error_log  logs/error.log;
                access_log  logs/access.log  main;
                root /usr/local/apache/htdocs;

geo $http_true_client_ip $forbidden {
                default no;
        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


Posted at Nginx Forum:,13912,15190#msg-15190

More information about the nginx mailing list