I would like for Apache2 to start whenever the computer is booted. I'm using Ubuntu 13.10. To get Apache to start, I run this command in terminal:
sudo /usr/local/apache2/bin/apachectl start
I will probably need step-by-step directions.
I would like for Apache2 to start whenever the computer is booted. I'm using Ubuntu 13.10. To get Apache to start, I run this command in terminal:
sudo /usr/local/apache2/bin/apachectl start
I will probably need step-by-step directions.
From the location of the command (/usr/local/...
) it seems that you have compiled apache yourself, and not installed the distribution's package.
The startup of the httpd daemons should be controlled by either upstart or the System-V style script in /etc/rc.d
.
The simple solution is to add the command to /etc/rc.local
. This file is a script that is executed at the end of the booting process. Open the file in your preferred editor, for example
gksudo /etc/rc.local
And add this before the line that read exit 0
:
if [ -x /usr/local/apache2/bin/apachectl ]; then
/usr/local/apache2/bin/apachectl start
fi
The test should avoid to have an error in the boot phase that will stop the boot process if somehow you manage to remove the program forgetting to re-edit the file.