LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2011, 05:16 PM   #1
nootkan
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Rep: Reputation: 0
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

http://www.linuxquestions.org/questi...f-file-734757/

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)
 
Old 01-13-2011, 08:22 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,361
Blog Entries: 16

Rep: Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146Reputation: 3146
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.
 
Old 01-13-2011, 09:12 PM   #3
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
That will work just fine. Just a little advice. When you are backing up the original file name it something like http.conf.org with .org extension so you know its the original config file.
 
Old 01-13-2011, 09:32 PM   #4
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 780
Blog Entries: 6

Rep: Reputation: 75
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

backup-docs-cpanel
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Change of Apache httpd.conf doesn't work on CentOS/RedHat? photonxp Linux - Server 1 07-01-2010 12:12 AM
(CentOS 5.3 server) httpd.conf configuration issue involving DirectoryIndex xshad0wfx Linux - Server 4 06-19-2009 10:32 PM
Starting httpd: httpd: Syntax error on line 209 of /etc/httpd/conf/httpd.conf: Syntax sethukpathi Linux - Networking 6 04-12-2008 11:26 AM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration