Hide nginx version number
When Apache HTTPD server pretty much entirely dominated the market, one of the first tasks admin would do was to hide version number:
Remember this tag? :)
If you are on CentOS or Red Hat Enterprise Linux, nginx configuration is located at:
Setting that needs to be added is very similar to Apache's:
Make sure to add it in http context. You might already have configuration file for your “virtual host” similar like:
Since files under conf.d are automatically included in http context, all you need is to add server_tokens in the beginning of the file.
Restart nginx and there you go – instead of:
we will see:
Care to comment? Toot me on Mastodon: @email@example.com.
My name is Gytis Repečka, I am Solution Architect focusing on Data Vault automation. Experienced data professional with over 10 years of experience designing and implementing Data Warehouse solutions based on Teradata, Informatica PowerCenter, Oracle Data Integrator, PostgreSQL, AWS. I enjoy using, promoting and contributing to open source software and love communicating about tech to both advanced and non-tech people. Visit Inretio for consulting services. Mention me @firstname.lastname@example.org on Mastodon.