0

How do I start Apache automatically when Ubuntu server boots up?

I installed it from source because I like to run the latest stuff. I've found you can't always trust Aptitude to have the latest.

2 Answers 2

3

This should be the default behavior with the package in Ubuntu Server.

If for some reason it's not working, try the following command:

sudo update-rc.d apache defaults

This will create the symlinks needed for Apache's init scripts to be called at boot.

3
  • but I installed it from source because I like to run the latest stuff. Can't alwats trust the aptitude to have the latest I've found
    – user20338
    Oct 14, 2009 at 13:54
  • If using apache2, substitute 'apache2' for 'apache' Oct 15, 2009 at 4:51
  • In the case of installing for source, you need to create and install the init scripts. Many times these are distro specific! Oct 15, 2009 at 4:51
0

If you installed Apache via aptitude, it should have installed an init-Script (have a look at /etc/init.d/). Therefore, it should start automatically already.

However, you can run sudo update-rc.d apache2 defaults to re-install the symlinks of the init-script.

Here is a nice article describing what it's all about.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .