Control Web Panel

WebPanel => SSL => Topic started by: drudesign on February 24, 2020, 10:43:27 AM

Title: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: drudesign on February 24, 2020, 10:43:27 AM
Hello, I have a problem with SSL renewal.
The problem appeared few days ago.

I have few domans hosted on webpanel, but when I try to renew SSL for any domain, the certificate is created for first domain on the list and I get SSL_ERROR_BAD_CERT_DOMAIN error.

Any ideas what could be the cause?  Please help, thank you.
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: drudesign on February 24, 2020, 11:07:23 AM
I see that configuration file for domain in /usr/local/apache/conf.d/vhosts disappeared after SSL cert generation...
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: rcschaff on February 24, 2020, 02:24:03 PM
rebuild the config files.  It's a weird bug that doesn't always happen, but does on occasion.
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: drudesign on February 24, 2020, 02:32:52 PM
Thanks for the response, are you sure that rebuilding vhosts won't break all server configuration? Did you have similar issue?
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: rcschaff on February 24, 2020, 02:37:33 PM
Unless your modified a vhost, nothing should break. You can rebuild JUST that one domains vhosts as well.

CWP  -> Webserver Settings -> Webservers Domain Config
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: drudesign on February 24, 2020, 02:56:38 PM
I've rebuilt just one configuration for this particular domain only, but the problem with missing vhosts config after SSL certificate generation still persists.
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: rcschaff on February 24, 2020, 03:14:43 PM
I would try rebuilding all vhosts then.  That seems very odd.  Could be possible that the certificate renewal failed.  check /var/log/cwp/cwp_sslmod.log for any errors.
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: drudesign on February 24, 2020, 06:59:13 PM
Strange thing is that I've checked /root/.acme.sh/acme.sh.log and it seems that the certificate is generated correctly. I also have checked it on the website and there is no issue with certificate, only  vhost conf missing...
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: Sandeep on February 24, 2020, 07:26:35 PM
please try to rebuild webserver config

caution any custom changes to vhost will be lost.
Title: Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
Post by: drudesign on March 06, 2020, 04:03:39 PM
I tried to rebuild server, force all renovations and now I can't access CWP Panel :( restarting cwpsrv doesn't help. Help!
EDIT:
After some time CWP went back to normal, but the problem with disappearing vhosts still persists. Any other idea what could be the cause?