On a CentOS Web Panel (CWP) server, control panel stopped working after installing SSL certficate for hostname.
When starting cwpsrv service, i get following error.
[root@nvme ~]# systemctl start cwpsrv Job for cwpsrv.service failed because the control process exited with error code. See "systemctl status cwpsrv.service" and "journalctl -xe" for details. [root@nvme ~]# systemctl status cwpsrv.service ● cwpsrv.service - CentOS Web Panel service (daemon) Loaded: loaded (/usr/lib/systemd/system/cwpsrv.service; enabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since Wed 2021-02-10 04:51:53 CET; 1s ago Process: 3779 ExecStartPre=/usr/local/cwpsrv/bin/cwpsrv -t (code=exited, status=1/FAILURE) Feb 10 04:51:53 nvme.ssdnodo.com systemd[1]: Failed to start CentOS Web Panel service (daemon). Feb 10 04:51:53 nvme.ssdnodo.com systemd[1]: Unit cwpsrv.service entered failed state. Feb 10 04:51:53 nvme.ssdnodo.com systemd[1]: cwpsrv.service failed. [root@nvme ~]# /usr/local/cwpsrv/bin/cwpsrv -t cwpsrv: [emerg] annot load certificate key "/etc/pki/tls/private/hostname.key": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/pki/tls/private/hostname.key','r') error:2006D080:BIO routines:BIO_new_file:no such file) cwpsrv:configuration file /usr/local/cwpsrv/conf/cwpsrv.conf test failed [root@nvme ~]#
To fix this, i run
/usr/local/cwpsrv/htdocs/resources/scripts/generate_hostname_ssl
This generated the self signed SSL for hostname. After this CWP control panel started working.
Apache still was down, fixed it by removing SSL virtualhost config for server hostname form folder
/usr/local/apache/conf.d/vhosts/
You can see hostname auto SSL logs at
/var/log/cwp/autossl.log
See CWP
Leave a Reply