The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSL installed but Apache throws 500 Internal Error

Discussion in 'EasyApache' started by InteractM, Apr 12, 2013.

  1. InteractM

    InteractM Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    133
    Likes Received:
    1
    Trophy Points:
    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, webmaster@mydomain.com 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 webmaster@mydomain.com
        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
     
    #1 InteractM, Apr 12, 2013
    Last edited: Apr 12, 2013
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    As it suggests:
    check /usr/local/apache/logs/error_log
     
  3. InteractM

    InteractM Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    133
    Likes Received:
    1
    Trophy Points:
    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
    
     
  4. InteractM

    InteractM Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    133
    Likes Received:
    1
    Trophy Points:
    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
    
     
    #4 InteractM, Apr 12, 2013
    Last edited: Apr 12, 2013
  5. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    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!!!
     
  6. InteractM

    InteractM Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    133
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Yes, http works fine. As this is a shared IP (same site but production and staging) I have installed cert as nobody.
     
  7. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    For SSL you need a dedicated ip. How many sites are there in server? You should use nobody for server hostname.
     
  8. InteractM

    InteractM Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    133
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    #8 InteractM, Apr 12, 2013
    Last edited: Apr 12, 2013
  9. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    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
     
    #9 quietFinn, Apr 12, 2013
    Last edited: Apr 12, 2013
  10. InteractM

    InteractM Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    133
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page