在我们的 Nginx 配置中,我们目前有这个:-
limit_req_zone $binary_remote_addr zone=two:10m rate=15r/m;
limit_req zone=two burst=5 nodelay;
Run Code Online (Sandbox Code Playgroud)
现在我们要更改此设置,以便此速率限制适用于某些 IP 地址,然后设置另一个适用于其他 IP 地址的速率限制,但限制性稍低。
geo $limited_net {
default 0;
111.222.333.444 1;
}
map $limited_net $addr_to_limit {
0 "";
1 $binary_remote_addr;
}
limit_req_zone $addr_to_limit zone=two:10m rate=15r/m;
geo $less_limited_net {
default 1;
111.222.333.444 0;
}
map $less_limited_net $addr_to_limit {
0 "";
1 $binary_remote_addr;
}
limit_req_zone $addr_to_limit zone=three:10m rate=25r/m;
Run Code Online (Sandbox Code Playgroud)
因此,来自 IP 111.222.333.444 的流量将受到第一个限制性更强的速率限制的影响,而不是第二个限制性较低的限制。
我们也使用 cloudflare 并在 /etc/nginx/cloudflare.conf 中设置了与此类似的 cloudflare ip 地址https://support.cloudflare.com/hc/en-us/articles/200170706-How-do-I- restore-original-visitor-IP-with-Nginx-
这会给我我想要的吗?
还是应该更像这样?
geo $limited_net {
default 0;
111.222.333.444 …
Run Code Online (Sandbox Code Playgroud) 我已经安装
Logstash ElasticSearch Kibana
在 EC2 实例上。
我可以访问http://example.com:9200 在这里我得到
{
"status" : 200,
"name" : "Aleta Ogord",
"version" : {
"number" : "1.1.0",
"build_hash" : "2181e113dea80b4a9e31e58e9686658a2d46e363",
"build_timestamp" : "2014-03-25T15:59:51Z",
"build_snapshot" : false,
"lucene_version" : "4.7"
},
"tagline" : "You Know, for Search"
}
Run Code Online (Sandbox Code Playgroud)
所以弹性搜索是有效的,但是当我去
我得到“没有结果没有结果,因为没有找到与您选择的时间跨度匹配的索引”
我有一个配置文件
/etc/logstash/conf.d/ 包含以下内容:-
input {
file {
path => "/var/log/apache/access.log"
type => "apache-access"
}
}
filter {
grok {
type => "apache-access"
pattern => "%{COMBINEDAPACHELOG}"
}
}
output {
stdout { }
elasticsearch …
Run Code Online (Sandbox Code Playgroud)