SSL installed but Apache throws 500 Internal Error

InteractM

Well-Known Member
Apr 2, 2013
135
1
18
cPanel Access Level
Root Administrator
I have installed SSL certificate using WHM but when goes to the https connection Apache throws 500 Internal Error

Code:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.mydomain.com Port 443
And httpd.conf for SSL part:

Code:
<VirtualHost 10.38.10.10:443>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    DocumentRoot /home/my/public_html
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/mydomain.com combined
    CustomLog /usr/local/apache/domlogs/mydomain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User nobody # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
    ScriptAlias /cgi-bin/ /home/my/public_html/cgi-bin/
    SSLEngine on
    
    SSLCertificateFile /etc/ssl/certs/mydomain.com.crt
    SSLCertificateKeyFile /etc/ssl/private/mydomain.com.key
	SSLCACertificateFile /etc/ssl/certs/mydomain.com.cabundle
    CustomLog /usr/local/apache/domlogs/mydomain.com-ssl_log combined
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    <Directory "/home/my/public_html/cgi-bin">
        SSLOptions +StdEnvVars
    </Directory>

    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/ssl/2/nobody/mydomain.com/*.conf"

</VirtualHost>
Any clue?

Thanks
 
Last edited:

quietFinn

Well-Known Member
Feb 4, 2006
1,902
466
438
Finland
cPanel Access Level
Root Administrator
As it suggests:
More information about this error may be available in the server error log.
check /usr/local/apache/logs/error_log
 

InteractM

Well-Known Member
Apr 2, 2013
135
1
18
cPanel Access Level
Root Administrator
This is what I'm getting when tail error_log


Code:
[Fri Apr 12 14:45:25 2013] [error] [client 96.233.206.91] SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (503) of file "/home/my/public_html/index.php"
[Fri Apr 12 14:45:25 2013] [error] [client 96.233.206.91] Premature end of script headers: index.php
[Fri Apr 12 14:45:25 2013] [error] [client 96.233.206.91] File does not exist: /home/my/public_html/500.shtml
[Fri Apr 12 14:45:25 2013] [error] [client 96.233.206.91] File does not exist: /home/my/public_html/favicon.ico
[Fri Apr 12 14:45:25 2013] [error] [client 96.233.206.91] File does not exist: /home/my/public_html/404.shtml
 

InteractM

Well-Known Member
Apr 2, 2013
135
1
18
cPanel Access Level
Root Administrator
Also it says:

Code:
[Fri Apr 12 14:54:48 2013] [notice] SSL FIPS mode disabled
[Fri Apr 12 15:01:29 2013] [warn] VirtualHost 10.38.10.10:443 overlaps with VirtualHost 10.38.10.10:443, the first has precedence, perhaps you need a NameVirtualHost directive
 
Last edited:

arunsv84

Well-Known Member
Oct 20, 2008
372
1
68
127.0.0.1
cPanel Access Level
Root Administrator
Just want to confirm,

Is your website working fine without https ?

From the log it seems to be a permission issue. Make sure to chmod 644 to your index.php and check the ownership.

Cheers!!!
 

quietFinn

Well-Known Member
Feb 4, 2006
1,902
466
438
Finland
cPanel Access Level
Root Administrator
Code:
[Fri Apr 12 14:45:25 2013] [error] [client 96.233.206.91] SoftException in Application.cpp:422: Mismatch between target UID (99) and UID (503) of file"/home/my/public_html/index.php"
This means that the file "/home/my/public_html/index.php" and the user trying to use it is UID 99, which is "nobody".

Seems you have installed the certificate for the user "nobody", why is that?
Code:
<IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
</IfModule>
EDIT:
Ok I didn't read everything...
If you want to use this certificate for the domain Domain.com to access another site, say Anotherdomain.com, using SSL, you only can do it by using: https://Domain.com/~cPanelUsernameOfTheOtherSite
 
Last edited: