The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 02:39:42 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Starting Apache with SSL certs that have been passphrased  (Read 1236 times)
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 9896



View Profile
« on: December 17, 2010, 03:15:30 PM »

This is a little issue and probably doesnt affect many here, but here goes anyway.

If you have an Apache server with an SSL cert that has been passphrased (ie., when you purchased the cert you put a passphrase in the CSR) then when you start Apache it will stop and hang, asking you for that phrase before it actually kicks in and gets going. This is actually for your security - it means that nobody could swipe your certificate and impersonate you. But it's also a MAJOR PITA because Apache cannot be started automatically in (for example) rc3.d - it will hang the startup and not let apache get going. You'll be able to SSH in, kill the startup procedure and the start Apache, but it means that in the even of a power failure (or other restart) your websites will not come up automatically.

Here is the answer: You simply need to remove the encryption from the key file which is the matching pair for your .CRT file.
openssl rsa -in www.mydomain.com.key -out www.mydomain.com.unlocked

When you do this, you will of course be asked for the passphrase on the keyfile. Supply it and you'll get a new www.mydomain.com.unlocked file. mv your original file to a new name and mv the new .unlocked file to your original www.mydomain.com.key name. Restart Apache and you're good to go!



/P
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!