You could do this by doing the following outside of WHM:
1. Copy the initial SSL in /var/cpanel/userdata/nobody/domain.com_SSL location to /var/cpanel/userdata/username location
2. Change the domain to the new domain name for the file (so /var/cpanel/userdata/username/newdomain.com_SSL would be the new name).
3. Edit the file newdomain.com_SSL to change all instances of
nobody to the username for that domain and then changing /usr/local/apache/htdocs to the actual document root (/home/username/public_html/).
4. Copy the /etc/ssl/certs/ files from domain.com.crt and domain.com.cabundle to newdomain.com.crt and newdomain.com.cabundle
5. Copy the /etc/ssl/private/ file from domain.com.key to newdomain.com.key
After making those changes, then rebuild and restart Apache:
Code:
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak101030
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
It will complain about the multiple virtual host entries, but it will rebuild and should work regardless.