隐藏nginx的版本号
1 设置nginx.conf的http段参数server_tokens;
bear@njava:~/nginx-0.8.34# sudo vi /etc/nginx/nginx.conf user www-data; worker_processes 2; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; # multi_accept on; } http { include /etc/nginx/mime.types; server_tokens off; .....
2 重新编译nginx
修改nginx的代码,重新编译
bear@njava:~/nginx-0.8.34/src/http# vi ngx_http_header_filter_module.c /* static char ngx_http_server_string[] = "Server: nginx" CRLF; static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF; */ static char ngx_http_server_string[] = "Server: njava/4.1.6" CRLF; static char ngx_http_server_full_string[] = "Server: njava server /4.1.6" CRLF;
Leave a Reply
标签云
.htaccess 301 2010 Android apache cache cacti CSS date ddos discuz django fastcgi freebsd git google http iftop linux macos mysql nginx njava php pr python sed seo snmp ssh ubuntu ubuntu10.04 wordpress xdebug 优化 密码 文件 时区 用户 登录 监控 缓存 网站 脚本 颜色
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
近期评论
文章归档
链接表
QR Code
