You are hereBlogs / hutcho's blog / Renew SSL certificate on Ubuntu and Apache2

Renew SSL certificate on Ubuntu and Apache2


By hutcho - Posted on 15 June 2010

I just had to renew my SSL certificate and wanted to make a couple of notes that someone might find handy. (Probably me next year)

* Find the CSR file. (Or you can/should generate a new one)
Open /etc/apache2/sites-available/www.yoursite.com and search for '.key' which gives you the directory where the CSR file should be.
Or run something like the following command: find / -name '*.csr'

* Open the CSR file in nano and copy the text into the renew certificate field from your hosting provider.

* Check email for SSL certificate from SSL provider. Remember they will only send to certain email addresses like admin@yoursite.com, so set that up first.

* BACKUP THE CURRENT CRT FILE! Then paste text into the file www.yoursite.com.crt

* Restart apache2

* Test your web site. If the new pubic key doesn't match the private key apache will not start and your site(s) will all be down. You can fix the problem by restoring the crt file you backed up, or disabling SSL by editing /etc/apache2/sites-available/www.yoursite.com