隱藏nginx、apache與php版本號

餘二五發表於2017-11-15

1.隱藏nginx版本號

在nginx.conf主配置檔案http塊新增:server_tokens off;

重新載入nginx即可。

2.隱藏php版本號

在php.ini配置檔案中修改:expose_php = Off

重新啟動php-fpm即可。

3.隱藏apache版本號

在httpd.conf主配置檔案中新增:ServerTokens Prod

重新啟動apache即可。

本文轉自 baiying 51CTO部落格,原文連結:http://blog.51cto.com/baiying/1079408,如需轉載請自行聯絡原作者


相關文章