500 Internal Server Error – CentOS Web Panel

If you have installed your files in the public_html folder in your VPS and you end up getting a 500 Internal Server Error, chances are the problem is due to permissions/ownership settings of the folders or the files in the folder.

If you have ascertained that the permissions are correct but the error is still there, then the cause might be something different. Read on.

File Permissions 500 Internal Server Error

The first thing you should do is check your Apache server logs. (usually found at /usr/local/apache/logs/). Check the most recent error logs. You might see something like this:

SoftException in Application.cpp:357: UID of script “/home/mysite/public_html/index.php” is smaller than min_uid Premature end of script headers: index.php

This error usually occurs due to file permission errors. For example, you may have uploaded your files as a root user but assigned them to a folder that is managed by another user. To fix the error, you have to transfer ownership of the files to the correct user i.e. the user of the folder where you have uploaded them.

Here’s how to fix the MIN UID Error

i) Open your command console

ii) Log in as the root user (note: sudo users will not work, i.e. only root can give other users access to files. Read more here.)

iii) Execute this command:

chown user:user -R /home/user/public_html

Note: replace user with the user of the folder.

With this command, you should be able to clear the 500 Internal Server Error

Alternative Method

This method only works if you are using CentOS Web Control Panel.  With this method, you do not need to execute the command above. Simply follow the steps below:

i) Log into your CentOS Web Control Panel

ii) Select User Accounts tab from the let

iii) Select Fix Permissions from the ensuing menu

iv) On the next page, choose the user that is in charge of the folder of the website that is showing the 500 Internal Error and click “Fix Account Permissions”

Done!

Comment below if this helped you. If you wish, you can buy me coffee below:

500 Internal Server Error - CentOS Web Panel 1

 

 

One Response

  1. Tinhtiennet May 4, 2020

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get more tech stuff like this
in your inbox

Subscribe to our mailing list for occasional amazing tech stuff.

Thank you for subscribing.

Something went wrong.