匿名
未登录
登录
Linux78|wiki
搜索
查看“隐藏nginx版本信息”的源代码
来自Linux78|wiki
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
隐藏nginx版本信息
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
wiki:用户|用户
您可以查看与复制此页面的源代码。
修改3个位置,一个是nginx.h、另一个是ngx_http_header_filter_module.c、还有一个ngx_http_special_response.c。 一般修改都是在nginx编译之前修改,修改完了之后需要重新编译 scr/core/nginx.conf #define NGINX_VER "nginx/" NGINX_VERSION /src/http/ngx_http_header_filter_module.c (HTTP ResponseHeader) static char ngx_http_server_string[] = "Server: nginx" CRLF; /src/http/ngx_http_special_response.c static u_char ngx_http_error_tail[] = "<hr><center>nginx</center>" CRLF "</body>" CRLF "</html>" CRLF 隐藏版本号: 修改nginx.conf 在http{}加入 http{ server_tokens off; }
返回至
隐藏nginx版本信息
。
导航
导航
首页
最近更改
随机页面
栏目
Nginx
Kubernetes
Spring Cloud
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志