Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member asent's Avatar
    Join Date
    Apr 2005
    Posts
    32

    Default SSL On Server hostname

    Hey everyone,

    How would I go about setting up an SSL on the apache master hostname (eg. host02.myhostingcompany.com) 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 https://host02.myhostingcompany.com/~theirusername/


    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.

    EDIT:

    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.
    Last edited by asent; 02-06-2010 at 05:58 PM.

  2. #2
    Member
    Join Date
    Sep 2006
    Posts
    16

    Default

    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. #3
    Member asent's Avatar
    Join Date
    Apr 2005
    Posts
    32

    Default

    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:

    Code:
    <IfDefine SSL>
     
    <VirtualHost 1.1.1.1:443>
        ServerName server.yourhost.com
        ServerAlias www.server.yourhost.com
        DocumentRoot /usr/local/apache/htdocs
        ServerAdmin webmaster@server.yourhost.com
        UseCanonicalName off     
        UserDir public_html 
        <IfModule mod_suphp.c>          
            suPHP_UserGroup nobody nobody    
        </IfModule>
        ## User nobody # Needed for Cpanel::ApacheConf
        CustomLog /usr/local/apache/domlogs/server.yourhost.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ScriptAlias /cgi-bin/ /usr/local/apache/htdocs/cgi-bin/
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/server.yourhost.com.crt
        SSLCertificateKeyFile /etc/ssl/private/server.yourhost.com.key
        SSLCACertificateFile /etc/ssl/certs/server.yourhost.com.cabundle
        ErrorLog /usr/local/apache/domlogs/server.yourhost.com-ssl_data_log
        CustomLog /usr/local/apache/domlogs/server.yourhost.com-ssl_log combined
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    </VirtualHost> 
     
    </IfDefine>

Similar Threads & Tags
Similar threads

  1. Hostname and mail server with different SSL certs
    By billdagou in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-30-2008, 03:51 AM
  2. SSL cert works for hostname/cpanel but not hostname:2082
    By foxphiles in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-30-2008, 09:12 AM
  3. SSL over hostname
    By mike25 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-27-2007, 06:55 PM
  4. SSL on hostname
    By maokob in forum cPanel and WHM Discussions
    Replies: 21
    Last Post: 05-22-2006, 07:20 PM
  5. Server SSL different than hostname
    By eglwolf in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-10-2005, 04:03 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube