I added
server_tokens off;
to http{} section of /etc/nginx/nginx.conf file and restarted nginx with
service nginx restart
command. but server still publishing the server tokens when responsing to request. I also checked under the sites-enabled/available config files for if is there any server_tokens on, but no there isn't.