How do I gracefully restart Apache?

Is there any way to gracefully restart Apache? On a standard setup I would normally run this command:

<pre>sudo apachectl graceful</pre>

But the Apache 2 that comes with OS X Server 10.5 does not gracefully restart with this command. Instead it will interrupt all open connections stopping all downloads. I'm assuming this is because Apache is handled by launchd which doesn't support graceful restarts. Is there any way to get around this problem?

Mac OS X (10.5.1)

Posted on Feb 5, 2008 11:51 AM

Reply
2 replies

Feb 5, 2008 1:39 PM in response to rbates

I decided maybe there's a man page that will point in the right direction:

http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/launchct l.1.html

This is a complete stab in the dark. Launchd can receive commands from launchctl. but the launchctl command syntax is not the same as say apachectl. Try this command:

launchctl submit -p apachectl graceful

Let me know if that really performs a graceful restart. I'm a big fan of the graceful restart myself, and would hate to see that option not available from the commandline.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I gracefully restart Apache?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.