apache nginx php不显示版本号

http.conf 中的 修改为

ServerTokens Prod

ServerSignature Off

有的版本没有,在最后添加即可

php

php.ini 中的 修改

expose_php = Off

php

nginx.conf 的 http 中 添加

server_tokens off;