简体   繁体   中英

Magento before install on centos 7 getting 500 internal server error

Hi I am trying to install magento 1.9.x and magento2 in my centos operating system.. the following links help to configure apache2.4, php7 and mysql5.7 in centos.

Install magento link

after configure web server, php, mysql, magento files and all. I create database for magento2. Based on above link i did all steps one-by-one. After i run in browser localhost/magento2/

it show 500 Internal server error in firebug and blank browser.

I am beginner of centos and magento

Please any one help how to solve this problem i was spend past two days.

Apache error log:

[Sat Sep 10 14:22:33.728848 2016] [:error] [pid 2809] [client ::1:45432] PHP Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/magento2/var/page_cache" is not writable in /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\\‌​nStack trace:\\n#0 /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache/Backend/‌​File.php(180): Zend_Cache::throwException('cache_dir "/var...')\\n#1 /var/www/html/magento2/vendor/colinmollenhour/cache-backend-‌​file/File.php(87):

Zend_Cache_Backend_File->setCacheDir('/var/www/html/m...')\\n‌​#2 /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(153)‌​: Cm_Cache_Backend_File->__construct(Array)\\n#3 /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)\\n#4

/var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend/Factory‌​.php(158): Zend_Cache::factory('Magento\\\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true)\\n#5 /var/www/html/magento2/lib/internal/Magento/Framework/App/Ca‌​che/Frontend in /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php on line 209

To me this look like the main problem:

Uncaught Zend_Cache_Exception: cache_dir "/var/www/html/magento2/var/page_cache" is not writable in /var/www/html/magento2/vendor/magento/zendframework1/library‌​/Zend/Cache.php:209\\‌​nStack

You have the wrong permissions or wrong owner for this folder. You can fix this using chown for fixing the owner of that folder or chmod for fixing writing permissions for that folder.

Try this:

chown -R apache.apache /var/www/html/magento2/

This sets the whole magento2 folder to have apache as owner and group. It is not the best security measure but for testing is fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM