What's the point of forbidding access to wp-config.php?
Probably a dumb question...
the hardening doc suggests setting up your web server so that it prevents access to wp-config.php
. If you do this, and a client tries to access the file, Apache returns 403 Forbidden
, as expected.
If you don't do this, Apache returns 200 Ok
with an empty file. This is also as expected, because none of the php code in this file produces any output.
So what's the point? Surely this would only be an issue if the attacker had already broken in, and turned off php support?