Results 1 to 8 of 8
-
10-16-2002, 07:16 PM #1Newbie
- Join Date
- Oct 2002
- Posts
- 22
What's the best way to restart apache?
My server is RH 7.3. I was wondering, is there a difference between running the command:
/etc/rc.d/init.d/httpd restart
and:
/etc/init.d/httpd stop
/etc/init.d/httpd startssl
to restart apache, after say, editing the httpd.conf file? I've gotten advise for both. Is one safer/better than the other?
-
10-16-2002, 07:18 PM #2Web Hosting Master
- Join Date
- Apr 2002
- Location
- USA
- Posts
- 5,783
httpd graceful is the best if it is a live server.
-
10-16-2002, 07:20 PM #3Web Hosting Master
- Join Date
- Aug 2002
- Location
- London, UK
- Posts
- 9,039
apachectl graceful
above is the command i use.Matt Wallis
United Communications Limited
High Performance Shared & Reseller | Managed VPS Cloud | Managed Dedicated
UK www.unitedhosting.co.uk | US www.unitedhosting.com | Since 1998.
-
10-16-2002, 07:23 PM #4Newbie
- Join Date
- Oct 2002
- Posts
- 22
Wow...I've never even heard of the above two commands. I gather:
/etc/rc.d/init.d/httpd restart
is not a graceful command, and shouldn't be executed on a "live" server?
-
10-16-2002, 07:36 PM #5Web Hosting Master
- Join Date
- Aug 2002
- Location
- London, UK
- Posts
- 9,039
/etc/rc.d/init.d/httpd graceful
try the above.. if it works, use it.
graceful does a restart without dropping connections currently made to the server.Matt Wallis
United Communications Limited
High Performance Shared & Reseller | Managed VPS Cloud | Managed Dedicated
UK www.unitedhosting.co.uk | US www.unitedhosting.com | Since 1998.
-
10-16-2002, 10:05 PM #6Web Hosting Master
- Join Date
- Dec 2000
- Location
- The Woodlands, Tx
- Posts
- 5,974
That depends on why you want to do it. If you have simply made a change to the config file that you need to become active, then neither restart nor gracefull is needed. Simply make it re-read it's conf files..
/etc/rc.d/init.d/httpd reload
-
10-16-2002, 11:02 PM #7Web Hosting Guru
- Join Date
- Sep 2002
- Location
- Mansfield
- Posts
- 314
/etc/rc.d/init.d/httpd is a script that calls apachectl
apachectl configtest
apachectl reloadGUI admin tools have no honor. It is a good day to vi.
-
10-17-2002, 12:23 AM #8Newbie
- Join Date
- Oct 2002
- Posts
- 22
Originally posted by Webdude
That depends on why you want to do it. If you have simply made a change to the config file that you need to become active, then neither restart nor gracefull is needed. Simply make it re-read it's conf files..
/etc/rc.d/init.d/httpd reload