Below mentioned method is used to hide or remove the NGIX details from the header of your http requests.
sudo apt-get update
sudo apt-get install nginx-extras
Server details can be removed from response by adding following two lines in the nginx.conf (under http section)
more_clear_headers Server;
server_tokens off;
Just to inform even if you disable the Server header response the hard coded nginx responses will still include nginx. For example majority of the application I work on have the .htaccess usually devs protected this file. Just as an example if you visit that protected file you will see that nginx is returning nginx in the response :D.