http://emilientaque.fr/2010/01/how-to-disable-apache2-from-running-on-startup/
How to disable apache2 from running on startup
I was trying to remove the following warning from passenger-memory-stats, I had to install apache2 but without running it :
*** WARNING: The Apache executable cannot be found. Please set the APXS2 environment variable to your 'apxs2' executable's filename, or set the HTTPD environment variable to your 'httpd' or 'apache2' executable's filename.
# To stop apache2 for this session only:
sudo /etc/init.d/apache2 stop
# To remove apache2 permanently from startup scripts:
sudo update-rc.d apache2 remove
# To reinstate apache2 in the startup scripts:
sudo update-rc.d apache2 defaults