问题
想要隐藏nginx的版本号。
解决
编辑nginx.conf
添加如下配置,即可:
server_tokens off;
具体如下图:
重启nginx
这里假设nginx已经被systemctl管理了,即运行如下命令,重启:
sudo systemctl restart nginx
想要隐藏nginx的版本号。
添加如下配置,即可:
server_tokens off;
具体如下图:
这里假设nginx已经被systemctl管理了,即运行如下命令,重启:
sudo systemctl restart nginx
© 著作权归作者所有