The Apache HTTP server is installed by default in all Linux distributions and it is configured to run as service. I usually prefer to install Apache from source instead of using the default one. After installing Apache I want to run that instance as service so that it can be restarted automatically whenever machine is rebooted. This can be achieved easily by modifying /etc/rc.d/init.d/httpd file, which is configured to run the Apache installed with OS.
Comment the following section, though it is not required but I prefer to keep all configuration at one place
Modify the following lines-
if [ -f /etc/sysconfig/httpd ]; then
apachectl=/usr/sbin/apachectlto point towards your Apache installation
apachectl=/opt/apps/httpd-2.2.14/bin/apachectlNow your custom Apache instance will be started by OS instead of the default one.