Under PHP 5, I used to put custom PHP configuration in a file such as
/etc/php5/apache2/conf.d/99-foobar.ini and it’d be automatically included by the main
php.ini (after most others, thanks to the
Now in PHP 7, it seems to be more normal to add a custom module in
/etc/php/7.2/mods-available/foobar.ini and enable it with
phpenmod foobar. I guess there’s no priority-setting with this system?
I have now had this problem about every year for the last three or four years, and every time have completely forgotten how I resolved it the previous time. It’s especially annoying, because usually involves searching for such common terms as
directory, etc. which result in almost entirely useless information.
So, here, for my own future reference, is how to stop a stupid Apache from serving
/index.php (at, of course, any depth of the path):
So easy. The documentation explains it all.
I’ve just added it to the WebDB .htaccess.
(I have since discovered that this is, of course, already covered on StackOverflow.)