How to disable version display information in Nginx?

Viewed 18

I want to disable the version information of Nginx. I don't think the version display is very secure, how should I operate it.

1 Answers

The method is very simple, just add the "server_less tokens" parameter in the HTTP of nginx.conf

For example:

http {  
    include       mime.types;  
    default_type  application/octet-stream;  
    server_tokens off;      
    client_header_timeout       3m;  
    client_body_timeout         3m;  
    send_timeout                3m;  
    ...
}