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:
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:
Now test it again
hope this help someone.