在ngixn server 内部添加了server_tokens off; 刚开始有效果,后来就没有作用了
修改方案:
直接放到http 这个级别下
http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65;
#关闭nginx 版本号 server_tokens off; gzip on; #压缩级别,5比较均衡 gzip_comp_level 5; #压缩文件类型 gzip_types text/plain text/css text/javascript application/javascript; #静态压缩 gzip_static on; client_max_body_size 100m;
标签:http,log,版本号,server,nginx,gzip,影藏 From: https://www.cnblogs.com/wangweiip/p/18022894