In a website made with WordPress, I’m trying to find out how I hide the version of PHP and Apache2 when I inspect the site.
I think that should be in 000-default.conf
?
I tried to use
expose_php = Off
in php.ini, but it doesn’t work
In a website made with WordPress, I’m trying to find out how I hide the version of PHP and Apache2 when I inspect the site.
I think that should be in 000-default.conf
?
I tried to use
expose_php = Off
in php.ini, but it doesn’t work
2
Answers
To hide the version of apache, you should add in the server configuration file:
Apache have
/etc/apache2/conf-available/security.conf
file for these configurationsYou need to edit it and set
ServerTokens
fromOS
toProd
and
ServerSignature
fromOn
toOff
Thats the best way to do that, since this applies to all server configuration
If security conf was not enabled yet, just run ( as super user / root ) on terminal:
a2enconf secutiry; service apache2 restart