1. wget http://nginx.org/download/nginx-1.19.6.tar.gz

     

  2. 修改

    src/http/ngx_http_header_filter_module.c

    Nginx: Custom server_token

     

    Nginx: Custom server_token

     

    src/http/ngx_http_special_response.c

    Nginx: Custom server_token 

    Nginx: Custom server_token 

  3. nginx.conf

    http{
        server_tokens off;
    }