LinuxQuestions.org
Review your favorite Linux distribution.
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 01-12-2012, 12:31 AM   #1
udaya_fm
LQ Newbie
 
Registered: Jan 2012
Location: Bangalore
Distribution: Redhat
Posts: 8

Rep: Reputation: Disabled
Restarting HTTPD Without Affecting Hosted Sites


Hi all,

I am new to this forum. This is my first post to introduce my self. I am udayakumar working as IS Engineer in product based company. I have configured Nagios, LDAP, FTP, NFS, Samba, Apache,DNS and DHCP servers.

I got one question in Apache. If in Apache server there are 10 web sites has been hosted. I have to add another site in it. After completing all configuration how can i restart the httpd service with out disturbing rest 10 sites. If i restart httpd service all the sites will go down and come again.

Thanks regards,
S.Udayakumar
 
Old 01-12-2012, 06:47 AM   #2
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Rep: Reputation: 79
If you just want to take into account the changes of your apache config file, you can reload the config on your live server

Code:
# /etc/init.d/apache2 reload
or on redhat it might be this (not sure)
Code:
# service apache2 reload
This will not take your current web sites off line but just reload and apply the new config on the fly

Last edited by angel115; 01-12-2012 at 06:50 AM.
 
1 members found this post helpful.
Old 01-12-2012, 06:52 AM   #3
udaya_fm
LQ Newbie
 
Registered: Jan 2012
Location: Bangalore
Distribution: Redhat
Posts: 8

Original Poster
Rep: Reputation: Disabled
Reload will stop and start the service rt? The moment it is stopped all the sites will be down. is it possible to restart in different way?

-S.Udayakumar
 
Old 01-12-2012, 09:32 AM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
I have renamed this thread to be more in line with the subject matter and have moved it to Linux-Server
 
Old 01-12-2012, 10:21 AM   #5
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
Reload is the same as restart.Restart stops the service, and reload just reloads apache and recognize any changes you made to the httpd.conf.Thusly, reload is what you wanna do
Quote:
service httpd reload
 
1 members found this post helpful.
Old 01-12-2012, 11:42 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You can use graceful to restart apache child processes when they are inactive.

Regards
 
2 members found this post helpful.
Old 01-12-2012, 11:44 AM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
The previous replies are fine, but if you want to be more explicit:

Code:
# apachectl -t
Code:
# apachectl -k graceful
The first command performs a config file syntax check. The second command allows (or tries to allow) client connections to complete before performing a restart.

---

edit: bathory beat me to it.
 
1 members found this post helpful.
Old 01-12-2012, 11:59 PM   #8
udaya_fm
LQ Newbie
 
Registered: Jan 2012
Location: Bangalore
Distribution: Redhat
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hi all,
Thanks for all the replies. The info you have provided is very useful.

-S.Udayakumar
 
  


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
sites hosted on tomcat is slow dinakumar12 Linux - Server 1 08-13-2010 06:26 PM
Multiple httpd.conf entries in ps ax after restarting apache - is this normal? EnderX Linux - Newbie 3 09-24-2009 06:08 PM
cupsd and httpd restarting every Sunday at 4:02 kmasaryk Red Hat 1 06-05-2008 04:14 PM
httpd restarting every day GavB Linux - General 3 07-22-2007 06:08 PM
running httpd.conf without restarting apache mpower Linux - Newbie 3 03-16-2005 05:20 PM

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

All times are GMT -5. The time now is 05:01 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
Open Source Consulting | Domain Registration