Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I start apache automatically when ubuntu server boots up

share|improve this question

2 Answers 2

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

 
discard

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.