Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently took over a server that is using Apache2 with SSL. I have setup a new server to which I am migrating all of the old websites so that we can more easily scale (it's a cloud server) and so that I can set everything up correctly (or at least with some sort of convention).

I have read quite a few articles on setting up Apache2 and SSL with virtual hosts, but I'm a bit confused because all of the examples show three files and I only seem to have two. To compound the problem, they are all named differently (do the file extensions actually make a difference?).

The examples show something to this effect:

<VirtualHost X.X.X.X:443>
  ServerAlias something.mydomain.com
  ServerAdmin webmaster@mydomain.com
  DocumentRoot /var/www/project/client/site

  SSLEngine on 
  SSLCertificateFile /etc/ssl/certs/mydomain-cert.pem
  SSLCertificateKeyFile /etc/ssl/private/mydomain-key.pem
  SSLCertificateChainFile /etc/ssl/certs/mydomain-ca.crt
</VirtualHost>

However, the files I have are:

  1. _.mydomain.com.crt
  2. gd_bundle.crt

It is a wildcard certificate that we purchased through GoDaddy I believe. I believe that the first file is the actual certificate file and the gd_bundle.crt is the chain file, but that leaves me without a key file. There is also a random mydomain.csr file lying around on the old server, but it wasn't one of the files bundled with the download from GoDaddy, so I'm not really sure as to what it is.

Any help in figuring out what I need to do would be greatly appreciated. I am software developer, so I know my way around computers, but I have only dabbled in server setup/maintenance.

Much Thanks!

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

I think your guesses about those being the certificate and chain is correct.

What you need to do is look for the key file on your old server. Perhaps look at the old apache configuration file to see where key file is. Can you tell us a bit more about the old server? Maybe we can help you locate it.

share|improve this answer
    
I'm at lunch at the moment. I'll look for it in just a bit though. Thanks for your confirmation. If two people think it, perhaps it's right :-) Or, we'll all fall off a cliff and die =P –  Topher Fangio Dec 4 '09 at 17:53
    
As it turns out, we are using an old key file from our old domain...or it's the new file but was renamed wrong. Is it possible to use the same key file for multiple domains? –  Topher Fangio Dec 4 '09 at 19:31
    
It worked, I was correct about the two original files and the old key file worked when I renamed it, so I don't know if it was just never renamed or what. Anyway, thanks for your help! –  Topher Fangio Dec 4 '09 at 20:29
add comment

Just to answer that minor question in there: No, file extensions does not matter. .key and .pem are both common for key files.

You can also look for any private keys using 'grep -r "BEGIN RSA PRIVATE KEY" /etc'

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.