DEV Community

supachai jaturaprom
supachai jaturaprom

Posted on

Simple Remove or Change HTTP Server header in NGINX Plus.

First written, I must have remove or change strings value HTTP Server header in NGINX. Excellet, The NGINX Plus have Core functional (Build-in) without third-party dynamic module for solution this case, detial as like below.

Official Document: https://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens

nginx server_tokens

Example Configuration for nginx.conf

http { 
....
#server_tokens off; 
#server_tokens "Microsoft-IIS/8.5"; 
#server_tokens none; 
server_tokens ""; 
...
 } 
Enter fullscreen mode Exit fullscreen mode

Noted: Uncomment server_tokens lines for each testing case.

Capture Screen of Testing
testing server_tokens

Thanks for reading my written, Good luck.

Top comments (0)