If I delete the if! I get an error root at mail:~# nginx -t -c /etc/nginx/nginx.conf nginx: [emerg] unknown directive "($http_user_agent" in /etc/nginx/nginx.conf:82 nginx: configuration file /etc/nginx/nginx.conf test failed Posted at Nginx Forum: https://forum.nginx.org/read.php?2,271581,271585#msg-271585