Install more_set_headers in nginx 1.15.8
This is what I did to have enable more_set_headers on Ubuntu 16.04, since the module is an extra module and not created by nginx as @MichaelHampton explained below. With his guidance I was able to install nginx with more_set_headers.
#== I backed up my nginx folder to home
tar -czvf /home/nginx.tar.gz /etc/nginx
#== I removed then purged nginx - not sure if both are necessary
sudo apt remove nginx
sudo apt autoremove
sudo apt purge nginx
#== I removed all nginx entries from /etc/apt/sources.list
nano /etc/apt/sources.list
#== I did an apt-update and installed nginx
sudo apt update
sudo apt upgrade
sudo apt install nginx
#== I checked the version that was installed
nginx -v
#== I then upgraded nginx to the latest stable
sudo apt install software-properties-common
nginx=stable
sudo add-apt-repository ppa:nginx/$nginx
sudo apt update
sudo apt dist-upgrade
#== I then installed nginx-extras
sudo apt install nginx-extras
Once the above was completed, I edited my /etc/nginx/nginx.conf
and added the following as my first line:
load_module modules/ngx_http_headers_more_filter_module.so;
I then added the following to the http block:
more_set_headers Server: Uber;
I checked to see if my config was okay with nginx -t
Finally, I restarted the server with service nginx restart
As a final check, I went over to https://securityheaders.com, to see if "Nginx" was showing. Be sure to check Hide Results and Follow redirects
Hope this helps someone