Conversation
Notices
-
Figured out how to make Apache restart without me having to type in the SSL key passphrase. I feel smarter now.
- laurelrusswurm repeated this.
-
congratulations @gomerx :)
-
I don’t suppose you’d like to share? :D
-
To unencrypt the key, do ‘openssl rsa -in server.key -out server.key.new’. Swap the new unencrypted key for the old and restart apache.
-
My key lives in /etc/pki/tls/private/dent.goemrtronic.com/key. Make sure to chmod 600 the new key so only root can read it.
-
or rather /etc/pki/tls/private/dent.gomertronic.com.key
-
Thanks – I ran into that last year, and was terrified that something was going to restart apache and shut the server down. :P
-
It has to do with SSL keys; the SSL key stops the apache startup process and prompts for a password. :/
-
@windigo but is that a config option in apache? Mine never asks for a passphrase.
-
Probably has to do with how you generated your key pair. In Red Hat theirs a Makefile, but it automatically encrypts the key.
-
I’ve been having problems everytime I update anything apache related. The ‘yum update’ process just hangs, which is kind of scary.\
-
@gomerx well I have keys but they’re in no way connected with apache. I can just restart it as root without typing a passphrase for any key.
-
@gomerx is right, it’s an option for when you generate your cert/request. It sounds like a good idea at the time. :D
-
Then you’re not running https? You have to have a key/cert pair to do SSL.
-
@gomerx yes I do https with an unverified cert.
-
@gomerx I have the certificates but they don’t require me to type passphrase when restarting apache.
-
That’s what I’m talking about then. The cert has a key.
-
It’s probably how you set the cert up. I’ve got mine setup to use a key as well. I set it up similar to http://url.jpope.org/e2
-
Right. That will work. They don’t tell you to ‘chmod 600’ the key though, which is kind of important. Or maybe I missed it.
-
@gomerx ok so it’s just that your key requires passphrase & mine doesn’t. I guess I chose to do it that way. Can’t remember what default is.
-
Right. Red Hat generates and encrypted key, which requires a passphrase. You generated an unencrypted one. I just unencrypted mine.
-
@gomerx Yep. It’s not there but, I did that on my own actually. ;)
-
@gomerx got it. That should make life easier. :)
-
I’m not sure what the best practice is. There’s a SSLPassPhraseDialog directive for apache, but I can’t get it to work.