Can't install SSL Certificate on WHM (Apache)

adjenz

Member
Mar 13, 2012
7
0
51
cPanel Access Level
Root Administrator
Hello,

I am trying to install a SSL certificate on WHM and I keep getting this error.

"_get_vhost_data_structs could not fetch vhost hash"

Server: adjenz.com
WHM Build 11.42.0 B12

I have the cert installed on adjenz.com on cPanel. ALSO have it installed under 'Service Configuration - Manage SSL Certificates' and working on all 4 areas in there.

When I go to install the cert in WHM, browse Account "adjenz" then everything populates. Then when I hit install I get the error
"_get_vhost_data_structs could not fetch vhost hash"

Thanks,
~Aaron
 

rhenderson

Well-Known Member
Apr 21, 2005
785
2
168
Oklahoma
cPanel Access Level
Root Administrator
Hi,

I had some issues installing some SSL's and even got cPanel tech support involved, they installed it without a hitch. I forgot about it until the next time :) So I started digging around, I was using IE, so I tried Chrome and it worked fine. Not sure why IE was causing issues, but it was. I figured it was something on my end so I did not report a bug. You might just try a different browser to see if the error remains the same.
 

adjenz

Member
Mar 13, 2012
7
0
51
cPanel Access Level
Root Administrator
Hi,

I had some issues installing some SSL's and even got cPanel tech support involved, they installed it without a hitch. I forgot about it until the next time :) So I started digging around, I was using IE, so I tried Chrome and it worked fine. Not sure why IE was causing issues, but it was. I figured it was something on my end so I did not report a bug. You might just try a different browser to see if the error remains the same.
Good suggestion...

I tried Firefox 27.* & Chrome... no luck. :-(
 

rhenderson

Well-Known Member
Apr 21, 2005
785
2
168
Oklahoma
cPanel Access Level
Root Administrator
Good suggestion...

I tried Firefox 27.* & Chrome... no luck. :-(
Shucks.....It was an easy try, I noticed you were running WHM Build 11.42.0 B12, is that an "Bleeding Edge" build? If so there might be some issues in the build and if it is safe you might need to downgrade or put in a support ticket to cPanel.

Have you altered the httpd.conf other than going through WHM? If so there might be an error.

Have you looked at the Apache or cPanel error logs, maybe something in there will point you in the right direction on what is causing the error.

The error appears to point to Apache. I would probably give /scripts/rebuildhttpdconf a shot if it was me and maybe even easy apache.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

I see ticket number 4613903 has been opened for this issue. I will update this thread with the outcome of that ticket when it's completed.

Thank you.
 

adjenz

Member
Mar 13, 2012
7
0
51
cPanel Access Level
Root Administrator
Correct, Chris was thinking it due to my hostname being the same as the domain name. I did have an existing Cert that was working perfectly before, this all started happening when I deleted the old cert (forcefully) and went to load the new one.
 

rhenderson

Well-Known Member
Apr 21, 2005
785
2
168
Oklahoma
cPanel Access Level
Root Administrator
Correct, Chris was thinking it due to my hostname being the same as the domain name. I did have an existing Cert that was working perfectly before, this all started happening when I deleted the old cert (forcefully) and went to load the new one.
Yeah its best to have the Hostname FQDN different than your domain, it can be a subdomain, such as if your domain is ...

mydomain.com then the hostname could be host.mydomain.com
 

Darkhorse

Registered
Jan 29, 2014
1
0
1
cPanel Access Level
Root Administrator
ERROR : _get_vhost_data_structs could not fetch vhost hash
[~]# hostname
host.myserver.com
[~]# grep main_domain /var/cpanel/userdata/nobody/main
main_domain: host.myserver.com

if main domain is not same as hostname then backup that file [cp /var/cpanel/userdata/nobody/main /root/] and edit it with hostname

That's it