关闭Tengine默认404页面的服务器信息显示

Tengine2.2的404默认页面是这样的

 

404 Not Found

Sorry for the inconvenience.
Please report this message and include the following information to us.
Thank you very much!

 

URL: https://cyber.zhenergy.com/soft/122.php
Server: cyber-server02
Date: 2022/05/17 15:29:15

Powered by Tengine


tengine

修改nginx.conf的配置,在http中加入下列两个参数即可关闭:

server_tag off;
server_info off;

server_info 显示的是“Powered by Tengine”
server_tag 显示的是”URL”,”Server”这些信息

发表评论

您的电子邮箱地址不会被公开。