May 28, 2011 10:28AM
Thomas Love Wrote:
-------------------------------------------------------


> > 1. how should i block remote_addr based on IP in
> a certain external
> > file?
> >
>
> It's in your link: include /etc/nginx/block.conf;


Not correct. The "block.conf" as that guy mentions is only a collection of rules.

I am asking if I can have a file that is full of host names or IPs, say "blacklist.conf". Then, I want to do something like this:


if ($request_uri ~* ("/blacklist.conf") ) {
return 403;
}

if ($remote_addr ~* ("/blacklist.conf") ) {
return 403;
}


This way I can keep easily adding or removing IPs/hosts from my blacklist file instead of editing the nginx.conf file every time.

Thanks.
Subject Author Posted

Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 04:14AM

Re: Newbie questions about nginx (moving from apache)

Igor Sysoev May 27, 2011 04:26AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 04:28AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 12:19PM

Re: Newbie questions about nginx (moving from apache)

Igor Sysoev May 27, 2011 04:36AM

Re: Newbie questions about nginx (moving from apache)

Igor Sysoev May 27, 2011 12:44PM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 12:59PM

Re: Newbie questions about nginx (moving from apache)

pk899 May 27, 2011 11:54PM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 09:24AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 09:31AM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 09:58AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 10:28AM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 09:32AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 09:55AM

Re: Newbie questions about nginx (moving from apache)

Thomas Love May 28, 2011 10:06AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 10:18AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 28, 2011 10:20AM

Re: Newbie questions about nginx (moving from apache)

Maxim Dounin May 28, 2011 10:34AM

Re: Newbie questions about nginx (moving from apache)

pk899 May 29, 2011 01:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 192
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready