PDA

View Full Version : Startup Apache2


Martin_Blank
January 21st, 2007, 01:20 PM
Somewhere between installing Apache, MySQL, and PHP, somehow both Apache 1.3 and Apache 2 were installed on my system. That's fine, but currently Apache 1.3 starts at boot, when instead, I need Apache 2 to start at boot. However, I can't figure out how to accomplish this. I've tried playing with update-rc.d but that hasn't helped. I was hoping someone might be able to shed some light on this issue. Thanks.

niekko
January 21st, 2007, 01:26 PM
Would this be of help: https://help.ubuntu.com/community/UbuntuBootupHowto (https://help.ubuntu.com/community/UbuntuBootupHowto)

Martin_Blank
January 21st, 2007, 08:32 PM
That did help quite a bit. I was able to remove 1.3 from startup.

In order to get Apache 2 running, however, I had to modify /etc/default/apache2 and change the NO_START flag to 1. Now everything appears to be working correctly. :)

Thanks for the tip!

joebobfrank
July 10th, 2007, 04:43 PM
I misread this and got hung up for hours. In case anyone else has the issue, the file in question is:

/etc/DEFAULTS/apache2 (defaults not all caps in the real world)

AND DEFINETLY NOT UNDER ANY CIRCUMSTANCES

/etc/apache2/apache2.conf

Don't know why I kept thinking that was where I needed to go, especially when the right file was referred to in the /etc/init.d/apache2 script, but whatever...

CyDharttha
July 27th, 2007, 04:58 PM
Thanks, this did it for me. I made the mistake of installing apache, then realized my error, removed it and installed apache2. To note, the correct fiile is /etc/default/apache2 :)

felipeim
September 2nd, 2007, 11:54 PM
Hi,

I had the same problem.

I tried with sucess these steps below:

Create a "apache2" file on /etc/init.d/ with:

sudo gedit /etc/init.d/apache2

and put these two lines below:

#!/bin/sh
/etc/apache2/bin/apachectl start

Change the path to "apachectl" if necessary.

Then:

chmod +x /etc/init.d/apache2

And at last:

sudo update-rc.d apache2 defaults