I could not able to remove 'Server' header from response header of Nginx version 1.18 in Ubuntu 20.04 OS.
I have done the following steps:
sudo apt-get update
Installed nginx-extras by using command 'sudo apt-get install nginx-extras'
Added the code snippet 'more_clear_headers Server;' in http section of nginx.conf file.
After restarting the Nginx service, it shows the error that 'unknown directive more_clear_headers'.
But, I could remove 'Server' header from response header of Nginx version 1.4.6 in Ubuntu 14.04 OS by doing the above steps.
Can anyone please help me how could I remove 'Server' header from response header of Nginx 1.18 in Ubuntu 20.04 OS?
Thanks In Advance
You should load the 'ngx_http_headers_more_filter_module.so' by adding the below code snippet in nginx.conf file.
load_module modules/ngx_http_headers_more_filter_module.so;
It will work.
Cheers!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With