LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-21-2006, 08:34 PM   #1
johndmann
LQ Newbie
 
Registered: Mar 2006
Location: Texas
Distribution: Debian Sarge
Posts: 16

Rep: Reputation: 0
Unhappy Apache hangs at boot time due to RSA - Need fix


Okay, so basically, I have Debian Sarge running Apache 1.x (1.3.33 or whatever number it is).

It used to be fine until I added in SSH abilities.

When I did that, when I rebooted the server (very seldom, but it happens), it would just stop when it got to the part of the startup which loaded Apache. I was able to SSH into the server from another system, and found that Apache was not running on the system at the time, so it was getting hung before it started up for some reason.

So, I removed it from the init scripts:
Code:
update-rc.d -f apache remove
This did the trick, and I can boot now, but it doesn't solve the issue of WHY it hangs on boot. Once I fixed that (I will add it back to the init scripts later, after I solve this problem), I was able to boot the system without hangs, but, of course, apache does not auto-start!

So, Once I got on the system, I did an apachectl start, and I think this is why it hangs - it asks for an RSA key passphrase, and it can't do that at boot time, so it never completes that task.
Code:
Apache/1.3.33 mod_ssl/2.8.22 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.

Server lists.mydomain.com:443 (RSA)
Enter pass phrase:

Ok: Pass Phrase Dialog successful.
/usr/sbin/apachectl restart: httpd started
So, my question is... How do I get it to NOT ask me for that pass phrase, so that I can boot-load Apache?

Last edited by johndmann; 04-21-2006 at 08:36 PM.
 
Old 04-21-2006, 09:19 PM   #2
ataraxia
Member
 
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
It wants the passphrase because the RSA private key is encrypted. If you instead store it on the disk in plaintext, this will fix your problem.

Install the "openssl" package - probably you have it already. Now, shut down apache, cd to /etc/apache-ssl/, and do
Code:
openssl rsa -in apache.pem -out apache.pem.new
mv apache.pem apache.pem.old
mv apache.pem.new apache.pem
The first command will ask you for the passphrase, and write the plaintext version to apache.pem.new .

All this assumes that your private key is stored in the default place, /etc/apache-ssl/apache.pem .
 
  


Reply

Tags
apache, boot, encryption, openssl, rsa, ssl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FIX---Fedora install hangs---To fix this---- jmckinzie Fedora - Installation 0 12-20-2005 12:08 AM
FC4 hangs at boot time overlord73 Fedora 2 06-29-2005 09:47 AM
Random System Hangs (Due to HD problems? ) webnoelle Linux - Hardware 2 07-28-2004 07:31 PM
system hangs every *other* time I boot stephanie_k Fedora 4 05-23-2004 02:08 PM
computer hangs at boot time cristi1979 Linux - Networking 0 07-04-2003 01:35 PM


All times are GMT -5. The time now is 06:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration