On Mon, Aug 06, 2007 at 09:14:55AM +0100, sagr wrote:
On Mon, 2007-08-06 at 08:21 +0100, Brett Parker wrote:
What you might be wanting to look at is the file /etc/default/apache2...
root@wildebeest:/# cat /etc/default/apache2 # 0 = start on boot; 1 = don't start on boot NO_START=1 root@wildebeest:/#
The contents of that file on install, IIRC are:
--- Begin File --- # 0 = start on boot; 1 = don't start on boot NO_START=1 --- End File ---
Yes, that is what I have.
Thus defaulting to not starting the apache2 server on boot (or, infact, ever from the init script).
?????? Errrr... Does this mean that EVERY SINGLE PERSON who wants to use Apache will encounter the same problem as me????
No, just debian and ubuntu users.
I am confused. What is the reasoning behind deliberately stopping Apache from starting automatically after someone has taken the trouble to install it? I would have thought the default would be to set it run rather than block it.
Will explain at the end ;)
Change that to NO_START=0 and reboot and the world should be a good place. Probably.
Yipeeeeeeeeeeeeeeeeeeeeeeeeeeeee!, I have just done that and my computer is now chugging away happily saying "Hello World" to the universe.
Hoorah.
Hope that helps,
Yes Brett; like you suggested, it looks like all my hassle boiled down to that one line in /etc/default/apache2. I wonder if this just a bug with Ubuntu or if every single person with every variation of Linux going to hit this same problem too?
It's not a bug, it's by design, and will occur with any debian derivitive - at install time it tells you about that file (or it certainly used to)...
Anyways - the basic reasoning behind it goes like this: if it's the first time you've installed the program, then you probably haven't configured it yet - now, although the default config *may* be ok - it might not be. In case you didn't want to open up port 80 on your machine to the world just by installing *a* package, lets set it to default to not starting. Make it a configuration issue to actually start the server, and you're not immediately distributing something that could (in theory at least) be a potential security hole.
BSD has defaulted to not starting services for a *long* time (it does it in a far far more complicated and, IMO, crappy way), at least in debian and ubuntu some services have a /etc/default/<serviceprogram> file that stops the service from automatically starting on boot in a similar way to the apache2 file.
I'm actually looking forward to all services following this mantra - that way I can install things, then configure them, *THEN* start them... as apposed to the current (occasional) install -> stop -> configure -> start that I go through.
Cheers,