Magento Unexpectedly Prompts to Download index.php
Sep 11
This was a new one for me. I was installing Magento today on Ubuntu Hardy (8.04.3 LTS to be exact) and ran into a problem where accessing the base Magento install URL would prompt to download the index.php file. The odd thing was that I could access the index.php directly and it would work just fine. This was running under Apache 2.2. It turns out that Apache needed my DirectoryIndex to be specified, which is strange because this hasn’t been a problem with other installations. At any rate, I updated my default config file located in /etc/apache2/sites-available with the following lines just before the closing VirtualHost tag:
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
I then restarted apache (sudo /etc/init.d/apache2 restart) and was good to go.
