There are many reasons for 500 error. I know 4 reasons and its solution.
1: Change file permission
500 internal server errors appears when logging to admin panel, so to solve it, you need to change permission of index.php file in root from 664 to 644.
Additionally, another index.php file in downloader/index.php should be changed permission to 644 to avoid error when navigating to System> Magento Connect> Magento Connect Manager.
2 : Increase php_value memory_limit
If seeing 500 errors in specific pages like checkout page or product page, it means your server lacks of resource for running Magento. So you need to expand memory for your server.
For .htaccess
file:
Add lines below:
<IfModule mod_php5.c>
Php_value memory_limit 256M
</IfModule>
For ini file:
Add following line and change it:
memory_limit = 256M
3 : Rename/remove .htaccess file
Wrong settings in .htaccess file can cause error. In this case, you should try renaming/removing .htaccess file.
4 : Disable maintenance mode
The maintenance mode may cause changing file permission of index.php to 666 and make it appear error as web browsers is able to execute.
Do as follows to disable maintenance mode:
Remove var/.maintenance.flag file
Change php permission to 755
Clear cache
That’s all solution for fixing 500 internal server error in Magento 2. Hopefully all of you can perform.