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.