Bijou Trouvaille Asked: 2012-12-03 20:15:00 +0800 CST2012-12-03 20:15:00 +0800 CST 2012-12-03 20:15:00 +0800 CST Remove server info from Apache mod_autoindex and error page footers 772 How to remove server info at the bottom of the directory listing? It looks like this: Apache/2.2.14 (Ubuntu) Server apache-2.2 2 Answers Voted Bijou Trouvaille 2012-12-03T20:15:00+08:002012-12-03T20:15:00+08:00 Add ServerSignature Off line inside either the .htaccess, the virtual host file, or the main config file. More info can be found in the official apache documentation. rubo77 2018-09-13T23:38:00+08:002018-09-13T23:38:00+08:00 Add ServerSignature Off to your main Apache config file. Also search for ServerSignature On in your whole apache config folder: cd /etc/apache2 grep -R 'ServerSignature On' * | grep -v '#' and change all findings with ServerSignature Off Also search in your web folder for such setting in all .htaccess files: find /var/www/ -name ".htaccess" -print | xargs grep "ServerSignature On"|grep -v '#' If those findings are too many, you can use sed to replace in the resulting output ServerSignature On with ServerSignature Off
Add
ServerSignature Off
line inside either the .htaccess, the virtual host file, or the main config file.More info can be found in the official apache documentation.
Add
ServerSignature Off
to your main Apache config file.Also search for
ServerSignature On
in your whole apache config folder:and change all findings with
ServerSignature Off
Also search in your web folder for such setting in all
.htaccess
files:If those findings are too many, you can use
sed
to replace in the resulting outputServerSignature On
withServerSignature Off