1 修改nginx.conf文件
路径:yourNginxHome/conf/nginx.conf
在http{}中加入
server_tokens off;
2 修改fastcgi.conf文件
路径:yourNginxHome/conf/fastcgi.conf
将fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;修改成
fastcgi_param SERVER_SOFTWARE nginx;
3 修改fastcgi_params文件
路径:yourNginxHome/conf/fastcgi_params
将fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;修改成
fastcgi_param SERVER_SOFTWARE nginx;
4 重启nginx
1 修改配置后重新加载生效
nginx -s reload
2 测试nginx配置文件是否正确
nginx -t -c conf/nginx.conf
3 完整有序的停止nginx
nginx -s quit
4 启动
start nginx