I installed magento2 on ubuntu14, and the apache prompt can be displayed when accessing http://localhost/. It Works! , but http://localhost/magento2/ prompts HTTP ERROR 500
I installed it using the following command:
apt-get update apt-get install git wget wget -O /usr/local/bin/composer http://getcomposer.org/composer.phar chmod +x /usr/local/bin/composer cd /var/www git clone https://github.com/magento/magento2.git cd /var/www/magento2 composer install
After the error, I checked the php error log and the prompt is as follows:
[Thu Sep 08 11:03 :34.275419 2016] [:error] [pid 2214] [client 127.0.0.1:41732] PHP Fatal error: Uncaught exception 'MagentoFrameworkExceptionFileSystemException' with message 'The file "/var/www/html/magento2/var/.regenerate" cannot be deleted Warning!unlink(/var/www/html/magento2/var/.regenerate): Permission denied' in /var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File.php:382nStack trace :n#0 /var/www/html/magento2/vendor/magento/framework/Filesystem/Directory/Write.php(173): MagentoFrameworkFilesystemDriverFile->deleteFile('/var/www/html/m...') n#1 /var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles.php(98): MagentoFrameworkFilesystemDirectoryWrite->delete('/var/.regenerat...')n#2 /var/ www/html/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(114): MagentoFrameworkCodeGeneratedFiles->cleanGeneratedFiles()n#3 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap. php(385): MagentoFrameworkAppObjectManagerFactory->create(Array)n#4 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(362): MagentoFrameworkAppBootstra in /var/www/html/magento2 /vendor/magento/framework/Filesystem/Driver/File.php on line 382
How to solve this situation? It allows me to install magento normally
I installed magento2 on ubuntu14, and the web page access http://localhost/ can display the apache prompt. It Works! , but http://localhost/magento2/ prompts HTTP ERROR 500
I installed it using the following command:
apt-get update apt-get install git wget wget -O /usr/local/bin/composer http://getcomposer.org/composer.phar chmod +x /usr/local/bin/composer cd /var/www git clone https://github.com/magento/magento2.git cd /var/www/magento2 composer install
After the error, I checked the php error log and the prompt is as follows:
[Thu Sep 08 11:03 :34.275419 2016] [:error] [pid 2214] [client 127.0.0.1:41732] PHP Fatal error: Uncaught exception 'MagentoFrameworkExceptionFileSystemException' with message 'The file "/var/www/html/magento2/var/.regenerate" cannot be deleted Warning!unlink(/var/www/html/magento2/var/.regenerate): Permission denied' in /var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File.php:382nStack trace :n#0 /var/www/html/magento2/vendor/magento/framework/Filesystem/Directory/Write.php(173): MagentoFrameworkFilesystemDriverFile->deleteFile('/var/www/html/m...') n#1 /var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles.php(98): MagentoFrameworkFilesystemDirectoryWrite->delete('/var/.regenerat...')n#2 /var/ www/html/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(114): MagentoFrameworkCodeGeneratedFiles->cleanGeneratedFiles()n#3 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap. php(385): MagentoFrameworkAppObjectManagerFactory->create(Array)n#4 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(362): MagentoFrameworkAppBootstra in /var/www/html/magento2 /vendor/magento/framework/Filesystem/Driver/File.php on line 382
How to solve this situation? It allows me to install magento normally
Try to install the package directly from the official website
Permission denied
Insufficient permissions. Make sure that the ./var directory is writable. It is best that the owner of the directory where the project is located belongs to apache
chown -R apache: apache ./