I am a newbie in Magento2. I am working on a site which was working perfectly until last night. I have not committed any changes but suddenly my site is giving HttpError 500. What's wrong with my site Please refer me any solution. It's my first project in Magento2.

  • Uncomment Or write following code under below file, app/bootstrap.php CODE : error_reporting(E_ALL); ini_set('display_errors', 1); And check what is error actually. – Nauman m. Mansuri Jan 17 '19 at 9:38
  • The error is getting because of server issue. – shivashankar m Jan 17 '19 at 9:48
  • Check with your admin once – shivashankar m Jan 17 '19 at 9:48
  • @shivashankarm admin mean server provider? – shweta mudgil Jan 17 '19 at 9:53
  • Yes, Check it once – shivashankar m Jan 17 '19 at 9:54

Go to your magento root on your server and execute these commands.

find . -type f -exec chmod 644 {} \;                        

find . -type d -exec chmod 755 {} \;                         

find ./var -type d -exec chmod 777 {} \;                

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 :www-data .

chmod u+x bin/magento
|improve this answer|||||

You check the standard var/log, var/report folder for any script error. 500 error will come usually for any php library is missing or .htaccess file issue. If php related issue means, definitely it will be logged on log file. And meanwhile which application mode are you using? Please enable developer mode ( php bin/magento deploy:mode:set developer ) to check the issue more specifically.

|improve this answer|||||

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.