Generally, the nginx server does not hide the server type and version information curl-I. http://10.60.30.23 Obtain the type and version code of the web server HTTP/1.1200 OKServer: nginxnginx/0.8.53Date: Tue, 14Dec201008: 10: 06GMTCont... generally, the nginx server does not hide the server type and version information curl-I. http://10.60.30.23 Obtain the Type and version code of the web Server HTTP/1.1 200 OK Server: nginx/0.8.53 Date: Tue, 14 Dec 2010 08:10:06 GMT Content-Type: text/html Content-Length: 151 Last-Modified: Mon, 13 Dec 2010 09:39:55 GMT Connection: keep-alive Accept-Ranges: bytes this is a security risk for the server. you can use the following methods to improve this situation: 1. edit source code .. /src/http/ngx_http_header_filter_module.c code 48 before modification static char ngx_http_server_string [] = "Server: nginx" CRLF; 49 static char ngx_ht Tp_server_full_string [] = "Server:" NGINX_VER CRLF; changed to code 48 static char ngx_http_server_string [] = "Server: pws 1.0" CRLF; 49 static char ngx_http_server_full_string [] = "Server: pws 1.0 "NGINX_VER CRLF; then compiled and installed. 2. edit/usr/local/nginx/conf/nginx. conf, add server_tokens off; restart nginx/usr/local/nginx/sbin/nginx-s reload. The final result is as follows: curl-I http://10.60.30.23 The modified Server information code HTTP/1.1 200 OK Server: pws 1.0 Date: Tue, 14 Dec 2010 08:24:32 GMT Content-Type: text/html Content-Length: 151 Last-Modified: Mon, 13 Dec 2010 09:39:55 GMT Connection: keep-alive Accept-Ranges: bytes author 275553385
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service