Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SSL On Server hostname

Discussion in 'General Discussion' started by asent, Feb 6, 2010.

  1. asent

    asent Active Member

    Apr 5, 2005
    Likes Received:
    Trophy Points:
    Hey everyone,

    How would I go about setting up an SSL on the apache master hostname (eg. which points to /usr/local/apache/htdocs. The hostname uses the server's main (shared) ip address. I want to set this up here so my hosted accounts who do not have a dedicated ip site could (if they want) go to secure by going to

    I configured the SSL for my hostname for imap/smtp/pop/ftp/whm & cpanel services but also want it setup for the master apache domain.

    The server host name does not appear in ssl hosts, only the dedicated ip sites appear there. I tried to install for the server hostname but did not work and no username (as there is no cpanel account for the master host and the files being owned by root).

    Any suggestions for doing this in WHM or should I do it old school on the cmd with apache. I just don't want cpanel updates to break it.

    Thanks in advance.


    Tried with user nobody but got some weird syntax errors. I just created the vhost for the shared ip and server hostname on port 443 in /usr/local/apache/conf/includes/post_virtualhost_global.conf and pointed to my crt, key, and ca files and it worked after apache restart. May be useful for others who run into these problems.
    #1 asent, Feb 6, 2010
    Last edited: Feb 6, 2010
  2. mattcampbell

    mattcampbell Member

    Sep 7, 2006
    Likes Received:
    Trophy Points:
    Are you able to post what you added?

    Also did you point to the certificate that was installed through the Manage Service SSL Certificates?
  3. asent

    asent Active Member

    Apr 5, 2005
    Likes Received:
    Trophy Points:
    Yes, I used the same cert and key files generated when I setup SSL on my services in whm.

    Here is the vhost I used:

    <IfDefine SSL>
        DocumentRoot /usr/local/apache/htdocs
        UseCanonicalName off     
        UserDir public_html 
        <IfModule mod_suphp.c>          
            suPHP_UserGroup nobody nobody    
        ## User nobody # Needed for Cpanel::ApacheConf
        CustomLog /usr/local/apache/domlogs/ "%{%s}t %I .\n%{%s}t %O ."
        ScriptAlias /cgi-bin/ /usr/local/apache/htdocs/cgi-bin/
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/
        SSLCertificateKeyFile /etc/ssl/private/
        SSLCACertificateFile /etc/ssl/certs/
        ErrorLog /usr/local/apache/domlogs/
        CustomLog /usr/local/apache/domlogs/ combined
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice