Managing httpd

Starting/Stopping httpd

To start httpd:

sudo /etc/init.d/apache2 start

logs are in /var/log/apache2

Fixes

2009-02-08 Nagios reported both Archiva and Continuum down. Joe found that httpd had died when rotating logs. He fixed /etc/init.d/apache2 as follows:

wsmoak@vmbuild:/etc/init.d$ diff -u /etc/init.d/apache2~ /etc/init.d/apache2
--- /etc/init.d/apache2~	2007-11-22 02:09:18.000000000 -0800
+++ /etc/init.d/apache2	2009-02-08 08:18:14.000000000 -0800
@@ -130,11 +130,7 @@
 	;;
 	restart | force-reload)
 		log_begin_msg "Forcing reload of web server (apache2)..."
-		if ! apache_stop; then
-                        log_end_msg 1
-                fi
-		sleep 10
-		if $APACHE2CTL start; then
+		if $APACHE2CTL restart; then
                         log_end_msg 0
                 else
                         log_end_msg 1
  • No labels