大网数据广告活动
网站运营与故障问答

update virtual host's SSL cert after cpanel has expired

· 52CE 我爱测

I had setup the server, virtual hosts via cpanel. I didnt renew my cpanel subscription because I no longer needed it. Now my SSL certificate has expired. I have SSH access to the server. How do I update the certificate without su…

问题原文

原帖链接 · Dushyant Bangal · CC BY-SA 4.0

I had setup the server, virtual hosts via cpanel. I didnt renew my cpanel subscription because I no longer needed it.

Now my SSL certificate has expired. I have SSH access to the server.

How do I update the certificate without subscribing to cpanel just to renew the certificate?

What I have tried:

  1. Replace the keys and certs in the user's home directory.

  2. update using whmapi1, but that says cannot read license.

已采纳解答

原帖链接 · Dushyant Bangal · CC BY-SA 4.0

If someone has a better answer, please post it. But here's how I was able to achieve it:

  1. Goto /var/cpanel/ssl/apache_tls/

  2. You will see a directory for each of your virtual host.

  3. Inside each directory, there is a certificates file and a combined file. There are also .cache files for both.

  4. Edit the certificate file, and put your certificate in place of the expired ones.

  5. Edit the combined file, and put your key and certificate in place of the expired ones.

  6. Rebuild the ssl.db for all users using /scripts/rebuildinstalledssldb

  7. Delete the .cache files (not sure if necessary)

  8. Restart apache2 using systemctl restart httpd

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-08-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。