diff --git a/HowtoNginx.md b/HowtoNginx.md index 7ef123f9..0165de57 100644 --- a/HowtoNginx.md +++ b/HowtoNginx.md @@ -283,6 +283,14 @@ server { } ~~~ +### Selon user-agent + +~~~ + if ($http_user_agent ~* (DotBot|Cliqzbot|AhrefsBot|SemrushBot)) { + return 404; + } +~~~ + ### Page personnalisé selon code erreur HTTP Contrairement à apache, on ne pourra indiquer une conf général à inclure qui s'appliquera pour tout les vhosts, mais il faudra ajouter l'include sur tout les fichier de confs des vhosts.