[Nginx]隱藏nginx版本號,以增強服務安全

實現方法以下:
一、修改nginx配置文件node

# vim nginx.conf
在http {—}里加上server_tokens off;
http {
……省略
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
server_tokens off;
…….省略
}nginx

二、修改fastcgi.conf配置文件
找到:
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
改成:
fastcgi_param SERVER_SOFTWARE nginx; vim

其餘方法待補充!tcp

相關文章
相關標籤/搜索