I created file 'virtual.conf' here ' /etc/nginx/conf.d/' with contenet:
if ($host = 'flexijob.ro') {
allow 11.234.23.4;
deny all;
}
nginx: [emerg] "if" directive is not allowed here in /etc/nginx/conf.d/custom.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed