Accidentally deleted part of my ssl.conf file

Support for webhosts that use CentOS
Post Reply
dabdalah
Posts: 2
Joined: 2011/12/27 23:25:02

Accidentally deleted part of my ssl.conf file

Post by dabdalah » 2012/01/03 22:42:21

Hello everyone,

A couple days ago I was trying to set up a self signed certificate but I accidentally deleted part of my ssl.conf file (located in /etc/httpd/conf.d/ssl.conf). I deleted almost half of the file and now I don't know how to get it to the way it was, I tried doing the :u command within the file but it says "Already at oldest change", and I don't wanna re install everything because I have waaayyy to much work done on this thing, and no I don't have a backup for that file :( Is there any way to get this file to the way it was? or does someone knows what the contents of the ssl.conf file are so I can just copy and paste them? Thanks in advance.

User avatar
TrevorH
Forum Moderator
Posts: 26863
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Accidentally deleted part of my ssl.conf file

Post by TrevorH » 2012/01/03 23:18:16

The file belongs to this package

[code]
$ rpm -qf /etc/httpd/conf.d/ssl.conf
mod_ssl-2.2.3-53.el5.centos.3.x86_64
[/code]

If you download that from your nearest CentOS mirror and run this

[code]
mkdir /tmp/r
cd /tmp/r
rpm2cpio ~/Downloads/mod_ssl-2.2.3-53.el5.centos.3.x86_64.rpm | cpio -idm
[/code]

It will unpack the contents of that rpm into the current directory and you can copy etc/httpd/conf.d/ssl.conf and compare/contrast/merge with your current one. You could also just

[code]
yum reinstall mod_ssl
[/code]

But that might back out any other changes you've made to the files owned by that rpm.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Accidentally deleted part of my ssl.conf file

Post by pschaff » 2012/01/04 03:41:50

[quote]
TrevorH wrote:
...
But that might back out any other changes you've made to the files owned by that rpm.[/quote]

More likely it will leave modified files in place and hopefully create *.rpmnew versions of the originals. Depends on how the rpm defines the actions.

Post Reply

Return to “CentOS 5 - Webhosting Support”