修改nginx的版本号

隐藏http头中的nginx版本号看起来更安全些。

要修改版本号可以后样:

vi path/to/nginx/src/core/nginx.h

 

文件内容如下:

#define nginx_version      1000000
#define NGINX_VERSION      "1.0.0"
#define NGINX_VER          "nginx/" NGINX_VERSION
#define NGINX_VAR          "NGINX"

#define NGX_OLDPID_EXT     ".oldbin" 

 

 其中 NGINX_VERSION 后面 1.0.0 就是版本号,改后重新编辑即可。

posted on 2011-04-13 23:02  Maxwell Hu  阅读(1122)  评论(0编辑  收藏  举报