Open boomsya opened 2 years ago
Us the bad-referrer-words.conf
file for this
i have tried code:
"~*(?:\b)searchphrase(?:\b)" 1;
and in file /etc/nginx/conf.d/globalblacklist.conf i have changed:
map $http_user_agent $bad_bot {
default 1;
but i see what still code 200 returning
i have tried code:
"~*(?:\b)searchphrase(?:\b)" 1;
and in file /etc/nginx/conf.d/globalblacklist.conf i have changed:
map $http_user_agent $bad_bot { default 1;
but i see what still code 200 returning
I will test but FYI don't ever change globalblacklist.conf it will get overwritten with every update only use the include files. Did you reload nginx after adding that?
i updating scripts manually once a 1-6 months yes.
nginx -s reload
searchphrase=
In your main location / block you need to nest this phrase
location / {
.....
do stuff
.....
location ~ /searchphrase= {
return 444;
}
}
tested
curl -I "https://xxxxxxxxxx/searchphrase=something"
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
sorry that not configured in your scripts. But anyway - thanks
works fine in nginx site config:
if ($request_uri ~* (searchphrase|searchword) ){
return 404;
}
works fine in nginx site config:
if ($request_uri ~* (searchphrase|searchword) ){ return 404; }
great, I'll have to add this kind of filter in as well
hi. How I can block requested url which contains phrase like "searchphrase=all" or "/component/search/?searchword" ?
log: