Created
September 6, 2015 11:23
-
-
Save DeviaVir/ab0ff1675229fd722d3f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# block specific user agents used for evil | |
if ($http_user_agent ~* "Purebot|Lipperhey|MaMa CaSpEr|libwww-perl|Mail.Ru|gold crawler|morfeus fucking scanner|ZmEu") { | |
return 403; | |
} | |
# Secure WP-login a bit better | |
set $blockemptyuseragent C; | |
if ($http_user_agent = '') { | |
set $blockemptyuseragent A; | |
} | |
location = /wp-login.php { | |
if ($blockemptyuseragent = A) { | |
return 403; | |
} | |
limit_req zone=one burst=1 nodelay; | |
server_tokens off; | |
proxy_pass http://http_vi_cluster; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in server {} block