首先隐藏nginx版本信息,只需编辑 nginx.conf 文件
添加一行
代码如下 | 复制代码 |
server_tokens off; http { |
响应头隐藏PHP版本休息,编辑php.ini文件找到expose_php = On , 修改为 expose_php = Off
代码如下 | 复制代码 |
;;;;;;;;;;;;;;;;; ; Miscellaneous ; ;;;;;;;;;;;;;;;;; ; Decides whether PHP may expose the fact that it is installed on the server |