Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I start apache automatically when ubuntu server boots up

share|improve this question

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.

share|improve this answer
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 '09 at 13:54
If using apache2, substitute 'apache2' for 'apache' – Charles Hooper Oct 15 '09 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! – Charles Hooper Oct 15 '09 at 4:51

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.