Welcome! Log In Create A New Profile

Advanced

Re: Blocking user behind proxy

October 20, 2009 08:34AM
[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
Subject Author Posted

Blocking user behind proxy

sameer October 15, 2009 07:22AM

Re: Blocking user behind proxy

vesperto October 15, 2009 08:30AM

Re: Blocking user behind proxy

sameer October 15, 2009 09:00AM

Re: Blocking user behind proxy

Reinis Rozitis October 15, 2009 09:46AM

Re: Blocking user behind proxy

Igor Sysoev October 15, 2009 10:20AM

Re: Blocking user behind proxy

sameer October 20, 2009 07:44AM

Re: Blocking user behind proxy

Igor Sysoev October 20, 2009 08:12AM

Re: Blocking user behind proxy

sameer October 20, 2009 08:34AM

Re: Blocking user behind proxy

Igor Sysoev October 20, 2009 08:48AM

Re: Blocking user behind proxy

sameer October 22, 2009 05:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready