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!

wildcard SSL - problem with set up domain and subdomain

Discussion in 'General Discussion' started by jelomada, Aug 10, 2012.

  1. jelomada

    jelomada Registered

    Joined:
    Aug 10, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,
    I'm trying install wildcard SSL.
    I have a wilecard SSL, and I want it work on domain.com and sub.domain.com
    I found this post: http://forums.cpanel.net/f5/ssl-certs-wildcard-domains-across-different-hosts-169030.html#post701022
    and follow the instruction.
    When I run /scripts/rebuildhttpdconf i got this message:
    Code:
    info [rebuildhttpdconf] 'local' datastore in use (/var/cpanel/conf/apache/local)
    warn [rebuildhttpdconf] SSL VirtualHosts with identical IP/Port detected: *.domain.com_SSL and sub.domain.com_SSL ... defaulted to sub.domain.com_SSL
    Built /usr/local/apache/conf/httpd.conf OK
    
    After rebuilding httpd conf, i got this virtualhost in httpd.conf (i guess it shouldn't be here or should look different):
    Code:
    <VirtualHost xxx.x.xx.x:443>
        ServerName *.domain.com
        ServerAlias www.sub.domain.com
        DocumentRoot /home/domain/public_html/sub
        ServerAdmin webmaster@domain.com
        UseCanonicalName Off
        Options -ExecCGI -Includes
        RemoveHandler cgi-script .cgi .pl .plx .ppl .perl
        CustomLog /usr/local/apache/domlogs/_wildcard_.domain.com combined
        CustomLog /usr/local/apache/domlogs/_wildcard_.domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User domain # Needed for Cpanel::ApacheConf
        UserDir disabled
        UserDir enabled domain
        <IfModule mod_suphp.c>
            suPHP_UserGroup domain domain
        </IfModule>
        <IfModule !mod_disable_suexec.c>
            <IfModule !mod_ruid2.c>
                SuexecUserGroup domain domain
            </IfModule>
        </IfModule>
        <IfModule mod_ruid2.c>
            RUidGid domain domain
        </IfModule>
        SSLEngine on
    
        SSLCertificateFile /etc/ssl/certs/*.domain.com.crt
        SSLCertificateKeyFile /etc/ssl/private/*.domain.com.key
        CustomLog /usr/local/apache/domlogs/_wildcard_.domain.com-ssl_log combined
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
        <Directory "/home/domain/public_html/sub/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/domain/wildcard_safe.domain.com/*.conf"
    
    </VirtualHost>
    
    It's only 443 host for this IP.
    The username is: domain

    I have copied this file:
    /var/cpanel/userdata/nobody/*.domain.com_SSL
    so now, i've got this files:

    /var/cpanel/userdata/nobody/*.domain.com_SSL
    Code:
    ---
    documentroot: /usr/local/apache/htdocs
    group: nobody
    hascgi: 1
    homedir: /usr/local/apache/htdocs
    ip: xxx.x.xx.xxx
    owner: root
    phpopenbasedirprotect: ~
    port: 443
    serveradmin: webmaster@domain.com
    serveralias: www.*.domain.com
    servername: "*.domain.com"
    ssl: 1
    sslcertificatefile: /etc/ssl/certs/*.domain.com.crt
    sslcertificatekeyfile: /etc/ssl/private/*.domain.com.key
    usecanonicalname: 'Off'
    user: nobody
    userdirprotect: ''
    
    /var/cpanel/userdata/domain/domain.com_SSL
    Code:
    ---
    documentroot: /home/domain/public_html/site
    group: domain
    hascgi: 1
    homedir: /home/domain
    ip: xxx.x.xx.xxx
    owner: root
    phpopenbasedirprotect: ~
    port: 443
    serveradmin: webmaster@orix.pl
    serveralias: www.domain.com
    servername: "domain.com"
    ssl: 1
    sslcertificatefile: /etc/ssl/certs/*.domain.com.crt
    sslcertificatekeyfile: /etc/ssl/private/*.domain.com.key
    usecanonicalname: 'Off'
    user: domain
    userdirprotect: ''
    
    it is: /home/domain/publi_html/site becouse domain.com point to the /home/domain/publi_html/site not to /home/domain/publi_html

    /var/cpanel/userdata/nobody/sub.domain.com_SSL
    Code:
    ---
    documentroot: /home/domain/public_html/sub
    group: domain
    hascgi: 1
    homedir: /home/domain
    ip: xxx.x.xx.xxx
    owner: root
    phpopenbasedirprotect: ~
    port: 443
    serveradmin: webmaster@domain.com
    serveralias: www.*.domain.com
    servername: "*.domain.com"
    ssl: 1
    sslcertificatefile: /etc/ssl/certs/*.domain.com.crt
    sslcertificatekeyfile: /etc/ssl/private/*.domain.com.key
    usecanonicalname: 'Off'
    user: domain
    userdirprotect: ''
    
    I spend a lot of hours to figure this out with no result. :confused:
    I will be really thankful for some help.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,609
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Your subdomain file shouldn't be in /var/cpanel/userdata/nobody location. Please move the sub.domain.com_SSL file to /var/cpanel/userdata/username location instead.

    Next, if the subdomain is not a wildcard name but a real subdomain name, these lines need to be changed in the subdomain's SSL userdata file:

    Code:
    serveralias: www.*.domain.com
    servername: "*.domain.com"
    These should be the actual subdomain name. Look at the /var/cpanel/userdata/username/sub.domain.com regular entry to see what it has for the same fields. Match those fields for it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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