0

I'm trying create and manage my Magento project with 2 domain on my webserver. I'm using Magento 2.2.2. 1. dev.test.com => for development. 2. test.com => for production. My idea is using github repo to push my update from development and then pull update to production but I have a problem now. I already created 2 domain on my webserver and tested it. Then I install and start coding on dev.test.com domain. Then I copied all files and folders in dev.test.com to test.com domain and modified env.php file to match with database and database user, then I use php bin/magento setup:rollback to rollback database in dev.test.com to test.com and modify web_unsecure_url to match with test.com. Final step, I clear pub/static/* , var/generated/* ,var/viewpreprocessed/, var/cache/ and do magento cache:clean.

Then I go to test.com to test but it gives me http_errors 500. What should I do to make it work Does anybody have idea for this issue? Thanks

2

I had this error before, the problem is in the files permissions.

Please follow this link to set the right permissions.

http://devdocs.magento.com/guides/v2.2/install-gde/prereq/file-system-perms.html

cd <your Magento install dir>
find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \;
find var vendor generated pub/static pub/media app/etc -type d -exec chmod u+w {} \;
chmod u+x bin/magento

you can also try to execute upgrade command to see if there are any errors or missed PHP extensions

php bin/magento setup:upgrade
| improve this answer | |
  • Thanks you so much. I missed set permission step. Working perfect now. – Tran Duy Mar 27 '18 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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