Renew expired self-signed SSL certificate
For some reason, it might be very difficult to find information on how to renew a self-signed certificate. This is a nice (and short) explanation: http://linux.togaware.com/survivor/Renew_SSL.html.
Please note that a .pem file is in fact (as you can guess from the small guide) a combined .key and .crt.
In short and only for the purpose of not loosing this reference (as has happened many times before with sites referenced on this blog), here is the procedure (just adapt to your case):
# cd /etc/apache2/ssl
# openssl genrsa -out togaware.com.key 1024
# chmod 600 togaware.com.key
# openssl req -new -key togaware.com.key -out togaware.com.csr
AU
ACT
Canberra
Togaware
Data Mining
Kayon Toga
Kayon.Toga@togaware.com
(no challenge password)
# openssl x509 -req -days 365 -in togaware.com.csr \
-signkey togaware.com.key -out togaware.com.crt
# mv apache.pem apache.pem.old
# cp togaware.com.key apache.pem
# cat togaware.com.crt >> apache.pem
# chmod 600 apache.pem
# wajig restart apache2