Results 1 to 2 of 2

Thread: wildcard SSL - problem with set up domain and subdomain

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    1
    cPanel/WHM Access Level

    Root Administrator

    Default wildcard SSL - problem with set up domain and subdomain

    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-cert...tml#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.
    I will be really thankful for some help.

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: wildcard SSL - problem with set up domain and subdomain

    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.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads

  1. Wildcard SSL for domain
    By NDanecker in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 09-24-2011, 11:10 PM
  2. Replies: 0
    Last Post: 02-28-2011, 08:57 AM
  3. *.domain.com Wildcard SSL issues :-(
    By dgfadmin in forum cPanel & WHM Discussions
    Replies: 10
    Last Post: 06-21-2010, 10:23 PM
  4. Q: How to set up a wildcard subdomain?
    By bramvandeperre in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 07-07-2009, 05:46 AM
  5. *.domainname.com How can I set up a wildcard subdomain?
    By Apexity in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 10-05-2004, 08:55 AM