There are a number of reasons that can cause such error but the best way to troubleshoot it is to check the server error logs.
joomla site customers can do this via cPanel, under Error Log. There you will see a list of the last error messages generated by your website. In this list you will find information about each error including:
- The date and time of the error.
- Description of the error.
- Information about which folder or file is possibly generating the error.
Here are some examples of the most common issues that can generate a 500 Internal Server Error:
1 | [Mon May 29 10:34:16.770700 2017] (13)Permission denied: [client 127.0.0.76] /home/user/public_html/.htaccess unable to check htaccess file, ensure it is readable |
The error above is mostly caused by incorrect permissions of the .htaccess file or the folder it is in (in the example below that would be the public_html folder). You need to ensure that the .htaccess file has 644 permissions and your directories have 755 permissions. You can modify the files/folders permissions via SSH, FTP, or using File Manager in cPanel.
1 | [Mon May 29 10:34:16.770700 2017] [client 127.0.0.76] /home/user/public_html/.htaccess: Invalid command, perhaps misspelled or defined by a module not included in the server configuration |
The error shows that there are incorrect directives inside the specific .htaccess. Make sure to revert any recent changed with the .htaccess, as they are the most probable cause.
1 | [Tue May 30 04:22:08.084009 2017] [core:error] [pid 23000] [client 82.118.240.253:40236] End of script output before headers: filename |
This error happens when the permissions of one of your files are too open. In the example above, filename would be the name of the file in question. To resolve it, you need to change the permissions of the problematic file to 644. These are also the recommended permissions for all your website files.
1 | [Thu Apr 19 01:47:39 2017] [client 127.0.0.76] Premature end of script headers: /home/user/public_html |
There are multiple reasons for this error to occur, caused by a large variety of different factors. Nevertheless, most often it is the result of having a very large file as a part of your website. On SiteGround\'s shared hosting servers there is a size limit for files that can be opened through the web. The limit is 2GB, and if your website includes a larger file, this will result in the above error.
You can check your website\'s files either via SSH, FTP, or the File Manager to locate the one causing the problem. Very often these are logs with PHP errors. On SiteGround\'s servers a log file is created automatically if you site\'s PHP scripts produce any non-critical errors or warnings during their execution. The log file\'s name is php_errorlog and it is located in the same directory as the script that produced the errors. Usually, this would be your site\'s directory.
You find this article useful? Click here to learn more about joombig template and extension experts and what else we can do for you!
Related Article
destination source:https://www.siteground.com/kb/internal_server_error_500/