This error might be caused because you have not set the correct permissions for the Magento folders. To solve this go to File Manager and then change the file permission of index.php file from 664 to 644. Also change the permissions of downloader/index.php file to 644 as well otherwise when you will try to access System > Magento Connect >Magento Connect Manager (after Magento installation) by logging to Magento admin, you will get 500 Internal Server Error.
You can also try this tool, it’s a Magento cleanup utility. It will set the correct permissions for your complete Magento installation:
Download it
Unzip magento-cleanup.php to the root directory of your Magento installation
Browse to http://example.com/magento/magento-cleanup.php