Blocking user behind proxy

Igor Sysoev is at rambler-co.ru
Tue Oct 20 16:44:22 MSD 2009


On Tue, Oct 20, 2009 at 08:34:09AM -0400, sameer wrote:

> 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;
>        }
> }

What is in access and error logs for 121.243.22.187 ?

> geo $http_true_client_ip $forbidden {
>                 default no;
>                 121.243.22.187  0;

-                 default no;
-                 121.243.22.187  0;
+                 default 0;
+                 121.243.22.187  1;

>         }
>         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

http {

    geo  ...

    server {

> I tried recompiling --with-http_geo_module and got an error.
> Using nginx version 0.7.62


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list