I switched Magento2 to production mode. But the site is not working, I get a http error 500.
Any idea, how I can solve the problem? Its running on Nginx. Thanks.
In Production mode 500 http error shows because of issue related to permission.
Please first give var and pub folder full permission.
If permisssion is given to var and pub folder,
Please run command,
php bin/magento cache:flush
Now run deployment command,
php bin/magento setup:static-content:deploy
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this.
Thanks.
I followed the steps, but it is not working.
Just remove var folder from root.
Run compile command,
php bin/magento setup:di:compile
The Backend (/admin) is working, Frontend is not working (HTTP ERROR 500).
Have you delete var folder from root and run di compile command.
yes I renamed var folder and was running compile again.
A new var folder has been created then.