The magento was installed in a testing environment.

1 - I copied all files from the folder and uploaded it to the production server folder.

2 - I exported the database and imported it into the production base.

3 - I put the appropriate permissions:       

 "sudo find var vendor pub / static pub / media app / etc -type f -exec chmod u + w {} \;

sudo find var vendor pub / static pub / media app / etc -type d -exec chmod u + w {} \;

sudo chown -R www: www-data / var / www / html / magento sudo chmod u + x bin / magento "

4 - Modwrite settings in production apache:


<Directory / var / www />
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow, deny
    allow from all
</ Directory>

sudo service apache2 restart

a2enmod rewrite "

5 - In the apache conf file I made the change:


   Options Indexes FollowSymLinks    AllowOverride None    Require all granted

6 - I changed the memory of php to = php_value memory_limit 256M

7 - I cleaned the cache files of the var/cache/* folder

8 - The .htaccess file is missing from the /var/www/html/ magento folder

Ask for help from you, everything I thought I could resolve I did. But the problem persists, help me.

  • Hi! If you got an error 500 you should be able to find some clue/error message into the apache error log. Can you start looking there?
    – Barbanet
    Jun 13, 2018 at 2:52
  • Please put .htaccess file in Magento2 root. It will work. Jun 13, 2018 at 4:33
  • Working or not? @Vanderson de Castro Jun 14, 2018 at 8:47

2 Answers 2


Put .htaccess file in Magento2 root.

It will work.


Check Apache/PHP logs

Check server logs for anything that might cause the error.

Check Magento logs

They are located in var/log folder of your Magento root. If you can't find any please check if they are enabled in System > Configuration > Developer > Log settings.

Run command:

php bin/magento cache:flush

php bin/magento indexer:reindex

php bin/magento setup:static-content:deploy

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.