Migrating a SSL certificate from a non-DA apache 1.3 to DA apache 2.0 server

davids

Verified User
Joined
Aug 9, 2006
Messages
10
We are currently performing server migrations on an old Redhat 7.x box to a new Fedora Core 4 box.

The old server didn't have direct admin and was running apache 1.3.

The new server is running direct admin and apache 2.0.

All the other stuff has been taken care of, however I'm having problems migrating my SSL certificates.

It seems actually to be giving me problems with the key file.

The key file contains some extra header information it.


-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,XXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-----END RSA PRIVATE KEY-----


The key was generated on our old machine. Direct admin is saying the key is invalid. So i can't add in the CRT.


Now here's where it gets even more interesting.

I modified the httpd.conf file for the user that uses the certificate, and changed it from the default server certificates to the key and certificates from the old server and restart httpd.

It works properly.

The problem comes in though when DirectAdmin queues the rebuilding of the httpd.conf files. Everything is changed back to the original server keys/certificates.

One of the certificates that I am migrating was purchased a matter of weeks ago, and the client is not going to want to purchase another one.

Does anybody know of a solution to get DirectAdmin to handle my old apache ssl keys/certificates?
 
for the sake of anybody who has this problem in the future, this is what the support people emailed back to me and it worked great:

Hello,

If that actually is a valid key, then just add it manually.

1) be sure to have a saved/backup copy of the cert/key

2) create a "self signed certificate" for the site, so as to setup all the configs.

3) manullay copy your cery/key files overtop of the self-signed ons:
/usr/local/directadmin/data/users/username/domains/domain.com.cert
/usr/local/directadmin/data/users/username/domains/domain.com.key

4) restart apache.

The key to this working (not being overwrtten) is step 2 in that DA knows to use the local cert/key hence your manual copy will stay.

Thank you,

John
 
Back
Top