Did you know you can hide your web server header? So what purpose of this approach?
I believe this is the best for the security practice.
So here we go. We need to get the sources/dependecies first.
Upgrade nginx to the latest stable
Add nginx repository
Update the package lists
Check nginx version
Install nginx-extras
Edit Nginx configuration file
Add modules in the first line and more_set_headers in http block
Test your nginx config and restart it
That’s it!