ilovett

Renewing Apache-SSL Certificates in Debian

August 9th, 2004

This entry was published quite a while back, so it may no longer be accurate. Reader beware!

I've been looking for a simple summary of how to regenerate Apache's SSL certificate, since the once created by the Debian installation script is only good for a month. I finally found one today, appropriately titled, "Howto renew your expired Apache SSL certificate in Debian". The commands are:

cd /etc/apache-ssl
openssl genrsa -out www.euhq.org.key 1024
chmod 600 www.euhq.org.key
openssl req -new -key www.euhq.org.key -out www.euhq.org.csr
openssl x509 -req -days 730 -in www.euhq.org.csr -signkey www.euhq.org.key -out www.euhq.org.crt
mv apache.pem apache.pem.old
cp www.euhq.org.key apache.pem
cat www.euhq.org.crt >> apache.pem
chmod 600 apache.pem
/etc/init.d/apache-ssl restart