How to keep apache from autostarting on system boot for Debian or Ubuntu

An easy way to remove apache2 (or another system service) from the start up scripts in Debian or Ubuntu is to use the update-rc.d mechanism.

For instance:

# update-rc.d -f apache2 remove

The “-f” is required if you have existing scripts in /etc/init.d/apache2. If you are planning on manually starting apache, the “-f” is [barring heroic/quixotic effort to create alternatives] a requirement.
Otherwise, in this situation, you will see:

update-rc.d: /etc/init.d/apache2 exists during rc.d purge (use -f to force)

A good write-up is here:
http://www.debuntu.org/how-to-manage-services-with-update-rc.d