需要修改nginx的配置文件
1、打开nginx.conf配置文件;
2、在http下配置proxy_hide_header项;
增加或修改为
proxy_hide_header X-Powered-By;
proxy_hide_header Server;
修改php.ini,expose_php改成Off
expose_php = Off
重启php和nginx