LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-29-2011, 08:55 AM   #1
cipher7836
Member
 
Registered: Dec 2008
Posts: 35

Rep: Reputation: 15
Migrate a Cert from RH64 to CentOS5


Hi all, I migrated a website onto a new server. So far everything works, but I need to import the certs. I have a directory with the name secure.foo.com. In it there is a secure.foo.com.crt and a gd_bundle.crt. These were given to me by the old server's owner. I tried to find where they were in the original server, and see if they would work on the new. But they didn't. What am I doing wrong? BTW, both servers will be named and look exactly the same.
 
Old 12-29-2011, 01:35 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
we've no idea what you've done wrong as you've not told us what you've done at all. What are these certs even for??
 
Old 12-29-2011, 01:52 PM   #3
cipher7836
Member
 
Registered: Dec 2008
Posts: 35

Original Poster
Rep: Reputation: 15
It's In the Thread

I migrated from one server to another. I was emailed security certs. I think they're SSL Certs. They have a .crt extension. There is one of them with the name of the server. There is another one with the name I typed above.
 
Old 12-29-2011, 01:56 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes, good for you. That has nothing to do with what the certificates are actually for though. https? ldaps? smtps?
 
Old 12-29-2011, 02:05 PM   #5
cipher7836
Member
 
Registered: Dec 2008
Posts: 35

Original Poster
Rep: Reputation: 15
Ssl = https?

I thought if they were SSL certs they would be HTTPS?

In any case, when I click on a secure area of the new website I get a certification error in the browser. Probably because I need to put those certs in there. Can these certs be migrated from one server to another even if the second server is almost like the original one, but on a new OS?
 
Old 12-29-2011, 04:08 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You don't know what you even want these certs for? SSL certs can be used in a HUGE number of ways... You can copy the certs for Apache easily, if you have the same ssl.conf (or whichever config file references the certs) then as long as the files are in the location referenced, then it should pick them up fine. There is no black magic whatsoever.
 
Old 12-30-2011, 08:18 AM   #7
cipher7836
Member
 
Registered: Dec 2008
Posts: 35

Original Poster
Rep: Reputation: 15
I must not be explaining myself very well. Let me try again....

Two years ago I setup a LAMP server for a website company. The owner of the server used the GUI to enter whatever certs he needed for the server. What certs he needed I didn't know since that wasn't my job. I was just paid to setup LAMP and Plesk, and he would do the rest.

Fast forward two years...the owner contacts me and wants the server moved. No problem. I setup LAMP on the new server. I got the new server looking like the old one except for the certs and minus Plesk which he doesn't want. Where do I find the old certs on the old server to put on the new? Where do I place them on the new? The owner of the server isn't using a GUI this time so I have to enter the certs myself, but I have no clue where to look or what I'm looking for. Which is why I am asking in here.
 
Old 12-30-2011, 08:45 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i've no idea where you'd find the old ones. look in plesk or explore under /etc/pki/ or similar possible places. if it is apache using these certs then the apache configs will reference it.
 
1 members found this post helpful.
Old 12-30-2011, 03:34 PM   #9
scorpioz22
LQ Newbie
 
Registered: Apr 2009
Posts: 9

Rep: Reputation: 2
The default location of certs on CentOS/RH5 is
/etc/pki/tls/certs/

You also need the keys for the certs you are trying to use, below is the default path, usually a ".key" file.
/etc/pki/tls/private/

You need to find out where your apache config is looking at though
grep secure.foo.com.crt /etc/httpd/conf.d/*conf

Copy the certificate and key file to the locations as specified in your apache config. chmod 400 key file.

service httpd restart

Look at error log and see if there are any errors. It will show you details like certificate not found or key not found etc.
 
1 members found this post helpful.
  


Reply



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
Error: Can't read cert file /etc/pki/tls/certs/cert.pem in Twiki jsaravana87 Linux - Server 1 09-09-2011 06:01 PM
OpenSSL / Sendmail verifies both "TLS cert" and "x509 cert" in client mode, why? fast-reflexes Linux - Server 0 09-12-2010 11:32 AM
how to migrate centos5.2 guest on vmware to virtualbox? windstory Linux - Newbie 7 01-22-2009 05:24 AM
migrate from suse, what should i migrate to? any suggestions?:twocents: Siljrath Linux - General 4 12-26-2005 01:14 PM
Best CERT to get. pete1234 Linux - Certification 14 11-29-2005 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:43 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration