SSL + cpanel = 500 internal server error

Been working on this issue for some time and its been rather annoying, finaly got it solved with the help of a very helpfull member of the cpanel forum by the name of Miraenda.


You get a 500 server error after installing an ssl cert and using https and your error logs in apache contain somthing along the lines of:
SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (503) of file “/home/someuser/public_html/anything.php”,

This is because the /var/cpanel/userdata/someuser/domain-name.com_SSL  does not contain the correct user info i.e. is installed as the wrong user (usualy nobody “UID (99) is nobody”)


To fix this you first need to find your domain-name.com_SSL file in /var/cpanel/userdata/ look in this directory you will have a bunch of users in here one of which is likley to be “nobody” and is a good place to start.

Once you find the file move it to the correct user location.
e.g. if you are not sure which user it should be installed as go to the directory that is causing the issue and run “stat /home/someuser/publichtml/somefile.php” this will give you enough info to find out who it should be installed as.

Now you have the file in the right place you need to make a few changes to the domain-name_SSL file to make it work correctly.

You should see the following lines:

documentroot: /home/user/public_html
group: user
homedir: /home/user
user: user

Replace user with the username for each one. note, these are not the only lines in the file, they are just the lines you need to change in that file.

If the account is a reseller and not owned by root, you will also need to change owner: root to owner: user.

Please also check the ip: field has the right IP listed.

After making all the changes, then run these commands to rebuild Apache with the new entries and get it restarted:

/etc/init.d/httpd restart

Now test it again :)

hope this help someone.


  1. #1 by Greg on August 26, 2011 - 7:20 PM

    Thank you! Rarely do I find a post that just seems to fix my problem outright!

  1. paico | Usando SSL no seu VPS + Erro 500 ao usar SSL
  2. ralph lauren shirts
  3. Moshi Monsters

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: