Reputation: 1017
How can we use keyval that is part of Module ngx_http_keyval_module in nginx.conf file as defined in https://docs.nginx.com/nginx/admin-guide/security-controls/blacklisting-ip-addresses/
Do we need to import some module in some way.
Following is my configuration on ngnix
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
keyval_zone zone=one:1m state=one.keyval;
keyval $remote_addr $target zone=one;
server {
listen 8080;
server_name localhost
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
include servers/*;
}
And i get an following error when i start nginx :-
nginx: [emerg] unknown directive "keyval_zone"
Upvotes: 1
Views: 2010
Reputation: 427
NGINX keyval module is available with NGINX Plus and if you don't have NGINX Plus subscription you can check one of the opensource implementations of Keyval here.
Upvotes: 0