安装magento之后提示:HTTP ERROR 500,请问怎么解决?
作者: default|标签:magento HTTP 提示|2018-5-18 16:58
我在ubuntu14上安装了magento2,网页访问http://localhost/能够显示apache的提示It Work!,但是http://localhost/magento2/提示HTTP ERROR 500
我是使用以下的命令安装的:

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

出错之后,我查了php的错误日志,提示如下:

[Thu Sep 08 11:03:34.275419 2016] [:error] [pid 2214] [client 127.0.0.1:41732] PHP Fatal error: Uncaught exception 'Magento\Framework\Exception\FileSystemException' 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): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/html/m...')n#1 /var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles.php(98): Magento\Framework\Filesystem\Directory\Write->delete('/var/.regenerat...')n#2 /var/www/html/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(114): Magento\Framework\Code\GeneratedFiles->cleanGeneratedFiles()n#3 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(385): Magento\Framework\App\ObjectManagerFactory->create(Array)n#4 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(362): Magento\Framework\App\Bootstra in /var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File.php on line 382

请问这个情况该如何解决?能让我正常安装magento

回复内容:

我在ubuntu14上安装了magento2,网页访问http://localhost/能够显示apache的提示It Work!,但是http://localhost/magento2/提示HTTP ERROR 500
我是使用以下的命令安装的:

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

出错之后,我查了php的错误日志,提示如下:

[Thu Sep 08 11:03:34.275419 2016] [:error] [pid 2214] [client 127.0.0.1:41732] PHP Fatal error: Uncaught exception 'Magento\Framework\Exception\FileSystemException' 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): Magento\Framework\Filesystem\Driver\File->deleteFile('/var/www/html/m...')n#1 /var/www/html/magento2/vendor/magento/framework/Code/GeneratedFiles.php(98): Magento\Framework\Filesystem\Directory\Write->delete('/var/.regenerat...')n#2 /var/www/html/magento2/vendor/magento/framework/App/ObjectManagerFactory.php(114): Magento\Framework\Code\GeneratedFiles->cleanGeneratedFiles()n#3 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(385): Magento\Framework\App\ObjectManagerFactory->create(Array)n#4 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(362): Magento\Framework\App\Bootstra in /var/www/html/magento2/vendor/magento/framework/Filesystem/Driver/File.php on line 382

请问这个情况该如何解决?能让我正常安装magento

直接官网下安装包试试

Permission denied

权限不足,要确保./var目录可写,最好是项目所在目录的owner都属于apache
chown -R apache:apache ./

0
点赞
收藏
0/300