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

 

arrow
arrow
    文章標籤
    ubuntu linux apache
    全站熱搜

    yuic123 發表在 痞客邦 留言(0) 人氣()