Getting rid of the pass-phrase dialog at Apache startup time

If you have installed an SSL certificate for your Apache web-server with a pass-phrase setup on the server key, then when you start or restart apache server, this dialog pops up asking you to enter the pass-phrase for the private key. The RSA/DSA private key inside your server.key file is stored in encrypted format for security reasons. The pass-phrase is needed to be able to read and parse this file. When you are sure that your server is secure enough you can remove the pass-phrase from the server.key by performing the following steps:

Make a backup of the encrypted key

cp server.key server.key.encrypted

Export the key

openssl rsa -in server.key.encrypted -out server.key

Enter the pass-phrase at the prompt

Enter pass phrase for server.key.encrypted:
writing RSA key

Update the permissions to be Read-only by root user

chmod 400 server.key

So now when you start/restart the Apache server, you should not be prompted to enter the pass-phrase for the server key as it is not encrypted anymore.

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">