I installed fresh nginx.
Was copy pasting step 1-6
root@vmi547555:/usr/local/sbin# sudo nginx -t
nginx: [emerg] "if" directive is not allowed here in /etc/nginx/bots.d/blockbots.conf:58
nginx: configuration file /etc/nginx/nginx.conf test failed
Some default nginx.conf files with different distro's are formatted differently, the setup tool tries to cater for most but it cannot cater for all. Just follow manual installation for such cases.
I installed fresh nginx. Was copy pasting step 1-6 root@vmi547555:/usr/local/sbin# sudo nginx -t nginx: [emerg] "if" directive is not allowed here in /etc/nginx/bots.d/blockbots.conf:58 nginx: configuration file /etc/nginx/nginx.conf test failed