0

Hello, guys!

I get weird behavior Magento 2.

I get a 500 error only on the home page, and on all other pages everything works correctly.

enter image description here

How can this be fixed? Please, help)

  • please see magento logs under var/log directory& resolve those issues: – Hassan Ali Shahzad Oct 12 at 20:09
1

go to bootstrap.php which will be in app/bootstrap.php (nano app/bootstrap.php) and uncomment the #ini_set('display_errors', 1);line in the sense it will be like ini_set('display_errors', 1); it will help you to show error message in front-end and fix the error.Happy coding fell free to drop any comments

0

Try to remove the .htaccess file from your Magento root folder and then try to load your website in the browser.

If it doesn't give 500 internal server error after removing the .htaccess file, then there must be some PHP version issue or any server configuration is missing.

  • 500 error did not disappear from the homepage, but the rest of the pages that worked well stopped I can’t understand why only the homepage gives a 500 error, and everything else works fine – David Young Oct 13 at 11:19
  • try to find error in log files under var/log directory & resolve those issues – Hassan Ali Shahzad Oct 13 at 17:42
  • This is a server error, and Magento errors are written to these files – David Young Oct 14 at 7:39
0

If using apache for example not having an additional module like mod version will throw 500 error. So you are not reaching magento application. Which means nothing in magento logs.

You will have to try and check server logs too. Exact location will be different depending on your stack.

  • Anyway, I don’t understand why the site works well, but the homepage gives a 500 error – David Young Oct 13 at 11:20
0

I solved problem!

It all consisted in the fact that the header was very large, or rather its size is 9.5 kilobytes, and the nginx limit was 4 kilobytes

I increased the limit for nginx

The header itself is formed so large due to client settings: for products in the carousel, it was mandatory to display the product id in the carousel in INSPECT, which is displayed on the homepage using the widget

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.