Linux Shell Tips published a tutorial showing you how to block specific user-agents in the Nginx Web Server.
How to Block User-Agents in Nginx Web Server
Suppose you are after infinite power and control in web administration. In that case, you have no choice but to consult Nginx, which is a reputable web server and is attributed to have almost infinite.
How to Block User-Agents in Nginx Web Server