close
Apache 配置檔案:
$ sudo vi /etc/apache2/conf-enabled/security.conf #Ubuntu 20.04
$ sudo vi /etc/apache2/apache2.conf #Debian/Ubuntu systems
$ sudo vi /etc/httpd/conf/httpd.conf #RHEL/CentOS systems
新增/修改/附加下面的行
ServerTokens Prod
ServerSignature Off
PHP:
隱藏 PHP 版本就是隱藏 "X-Powered-By: PHP/x.x.x.x" 這個,開啟 php.ini,加入:
expose_php = Off
重啟你的 Apache 伺服器:
$ sudo systemctl apache2 restart #Debian/Ubuntu
$ sudo sevice apache2 restart #RHEL/CentOS systems
文章標籤
全站熱搜