php-fpm隐藏版本号
vim /etc/opt/remi/php73/php.ini
expose_php = Off #注意O是大写
systemctl restart php
curl -I xxxx.com
nginx隐藏版本号
在nginx配置文件http{}字段下添加:
server——tokens off
systemctl restart nginx
curl -I xxxx.com
欢迎光临小魏的运维日常!
vim /etc/opt/remi/php73/php.ini
expose_php = Off #注意O是大写
systemctl restart php
curl -I xxxx.com
在nginx配置文件http{}字段下添加:
server——tokens off
systemctl restart nginx
curl -I xxxx.com