how to renew ssl certificates?

July 27, 2014 4.2k views

I have a ssl certificate on a domain. Now, I need to renew the security keys.
My server is apache. I will replace the certificates, but now does not want to restart apache.

The error:

~# sudo service apache2 restart
 * Restarting web server htcacheclean                                                                                                                                                                                             ...not running
[Sun Jul 27 21:47:38 2014] [warn] module cache_module is already loaded, skipping
[Sun Jul 27 21:47:38 2014] [warn] module cache_module is already loaded, skipping
Action 'start' failed.
The Apache error log may have more information.

The apache log error: http://pastie.org/private/wile3vp1wxn5m3pbdfjzw

2 Answers

Have you already renewed your SSL certificates? It looks like the private key was overwritten so now the certificate does not match it and Apache won't start as a result.

If you have generated a new CSR, the private key was most likely replaced as well, so the only option you have is to renew the SSL certificate as soon as possible.

  • Hy @Kamal, thanks.

    I already have one .csr, I used it on certificate disabled.
    will generate a new one .crt through this .csr and try again.

    Can you tell me if it is just change files (crt) and reset the apache?

  • Yes, you just need to change the crt. It's better to generate a new CSR and Key to make sure they match.

now, this is appear

~# sudo /etc/init.d/apache2 restart
 * Restarting web server htcacheclean                                           ...not running
[Sun Jul 27 23:01:13 2014] [warn] module cache_module is already loaded, skipping
[Sun Jul 27 23:01:13 2014] [warn] module cache_module is already loaded, skipping
... directory /var/cache/apache2/mod_disk_cache does not exist!
                                                                         [fail]
  • Have you recently modified any of Apache's config files? Try creating the directory:

    sudo mkdir -p /var/cache/apache2/mod_disk_cache
    sudo chown -R www-data /var/cache/apache2/mod_disk_cache
    
Have another answer? Share your knowledge.