We are working on a magento 2 project. Since Windows lack cron job, magento 2 refused work full fledged. We decided to install ubuntu.
After striving hard I was able to make PHP7, apach2, mySQL and phpmyadmin work. Now the next hurdle is Magento. It says
The localhost page isn’t working
localhost is currently unable to handle this request.
500
After hours of struggle I still have no idea on how to make it work.
Edit: I created a folder in var/www/html/Magento2 and copied all magento 2.02 files which has support for PHP7. Then I visit the Magento2 url. Bang I get the above error.
I need to confirm again PHP7 is working fine. Other scripts are working. I can even check for phpinfo. All the modules listed in the comment are installed.
PHP error log
[Sat Mar 12 10:09:29.489176 2016] [:error] [pid 1380] [client 127.0.0.1:44524] PHP Fatal error: Uncaught Magento\Framework\Exception\LocalizedException: Can't create directory /var/www/html/Magento2/var/generation/Magento/Framework/App/ResourceConnection/. in /var/www/html/Magento2/vendor/magento/framework/Code/Generator.php:103\nStack trace:\n#0 /var/www/html/Magento2/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\Framewo...')\n#1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Framewo...')\n#2 [internal function]: spl_autoload_call('Magento\\Framewo...')\n#3 /var/www/html/Magento2/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo...')\n#4 /var/www/html/Magento2/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...')\n#5 /var/www/html/Magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runt in /var/www/html/Magento2/vendor/magento/framework/Code/Generator.php on line 103