0

I am new to the magento development. I am trying to install magento 2.2.6 . My configurations

Apache/2.4.18 (Ubuntu)
PHP Version 7.0.32
Ubuntu 16.04
mysql 5.7.24

I have downloaded magento 2.2.6 (full release with sample data) from https://magento.com/tech-resources/download . then try to open localhost/magento.

It says

This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500

while i try composer install command

it provides output

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

What is the problem why i cant open magento setup in my locahost

enter image description here

ANSWER

I have found what is wrong .. I check the error log file and found out var folder permission issue. After i provide permission it working properly

1
  • I have found what is wrong .. I check the error log file and found out var folder permission issue. After i provide permission it working properly. Commented Nov 19, 2018 at 7:40

1 Answer 1

0

You need to provide chmod 777 permissions to the var, pub, generates and etc while before installing in magento 2, After that permissions you can start the magento setup. Remove the permission of files under etc folder to 644 after installation as this may cause security issues because files under etc folder contains sensitive information about our database.

cd < your Magento install dir >

find . -type f -exec chmod 644 {} \;   #644 permission for files   
find . -type d -exec chmod 755 {} \;   #755 permission for directory 
find ./var -type d -exec chmod 777 {} \; #777 permission for var folder    
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chown -R :<web server group> .

chmod u+x bin/magento

More you can see at

Magento 2 folder/file permissions

Mark this answer as tick if you got it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.