-   Linux - Newbie (
-   -   Backing up httpd.conf on CentOS 5 (

nootkan 01-13-2011 06:16 PM

Backing up httpd.conf on CentOS 5
Please excuse my ignorance but I need to learn how to back up my httpd.conf from my server to my computer and only found one solution via a google search

I typed in locate httpd.conf and see that it resides in /usr/local/apache/conf/httpd.conf so I assume I would type $ cd /usr/local/apache/conf
$ sudo cp -p httpd.conf httpd.conf.bak

I wanted to confirm this with an expert before I do damage that I cannot reverse. Please advise.

WHM 11.28.64
CENTOS 5.5 x86_64 standard
cPanel Version 11.28.64
Apache version 2.2.17
PHP version 5.2.16
MySQL version 5.0.91-community
Architecture x86_64
Operating system linux
Perl version 5.8.8
Kernel version 2.6.18-164.15.1.el5
cPanel Pro 1.0 (RC1)

frankbell 01-13-2011 09:22 PM

The copy command should work.

I think that httpd.conf is read at httpd startup, so you could probably copy the file while httpd is running without any problems.

After you've run the command, open the copy in an editor to make sure it looks copacectic.

jmc1987 01-13-2011 10:12 PM

That will work just fine. Just a little advice. When you are backing up the original file name it something like with .org extension so you know its the original config file.

routers 01-13-2011 10:32 PM

Dear @OP

My advice, do not alter any config file via konsole since you're using cpanel
because cpanel by mean its controlling everything include the system, eg.
if you break httpd.conf via cpanel then restoring old backup httpd.conf will not work
for your system.

Please run the backup via whm itsel. read this docs-cpanel


All times are GMT -5. The time now is 01:56 PM.