且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Nginx隐藏版本号

更新时间:2022-09-28 22:40:17

Nginx隐藏版本号
1、在nginx虚拟机主机配置文件中的server模块中增加一行server_tokens指令,指定关闭(off)显示版本号
server {
    listen      80;
    server_name 192.168.1.250;
    index index.html index.htm index.php index.jsp;
    server_tokens       off;
    root        /data/www/html;
    access_log  /var/log/nginx/wordpress.access.log combined_realip;
2、重启或重新加载Nginx服务器,测试访问









本文转自 jin626889 51CTO博客,原文链接:http://blog.51cto.com/zuoshou/1744019,如需转载请自行联系原作者