Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I usually:

  1. Update my local near-replica ( ServerName directive and Logs will obviously be different ) of the production conf file and make my changes for things like rewrite rules.
  2. /etc/init.d/apache2 restart or graceful locally and ensure it's working
  3. scp the conf file to the production server
  4. apache2ctl configtest
  5. apache2ctl graceful

I never really followed any sort of guide, just picked up some commands. Is this usually the way it's done? I almost always use graceful on the production server since I don't want to lose clients with a full restart - graceful restarting is fairly common, right? Are there any circumstances where graceful isn't sufficient and I need to do a full restart?

share|improve this question
up vote 2 down vote accepted

It depends on the scale you're at -- you've got the basic steps down, the main differences would be in how the config file is propagated to the production servers (bigger sites would involve things like checking it into revision control and waiting for or forcing Puppet, Chef, CfEngine, etc. to propagate the change out) and the degree of automation that is used (again, bigger sites hopefully have more automated procedures, since they'll be dealing with more than one server).

AS for graceful versus hard restart -- in the graceful, the "main" Apache parent process doesn't exit, just the worker child processes. I've seen circumstances where the primary process had some sort of cached state -- old DNS, whatever -- that didn't get flushed with a graceful, only a full stop/start cycle.

share|improve this answer
so would you recommend using graceful? would it help invoking graceful multiple times regarding the caching issue? – meder omuraliev Sep 3 '09 at 19:56
if you're just putting a new config in place, graceful will be sufficient. you can save the full bore stop/start cycle for troubleshooting strange happenings. 8^) – genehack Sep 3 '09 at 20:34
oh alrighty then, thank you – meder omuraliev Sep 3 '09 at 21:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.