Using /etc/init.d/apache2

Ubuntu uses the scripts in the /etc/init.d directory to control the startup and shutdown of various services, including the Apache web server. The main script installed for the Apache web server is /etc/init.d/apache2, although the actual work is done by the apache2ctl shell script included with Apache.

Note

/etc/init.d/apache2 is a shell script and is not the same as the Apache server located in /usr/sbin. That is, /usr/sbin/apache2 is the program executable file (the server); /etc/init.d/apache2 is a shell script that uses another shell script, apache2ctl, to control the server. See Chapter 12, “Automating Tasks and Shell Scripting,” for a description of some service scripts under /etc/init.d and how the scripts are ...

Get Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.