LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-28-2007, 06:53 AM   #1
NorwegianBlue
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Rep: Reputation: 0
Lightbulb apache2 does not start on reboot, kubuntu Feisty Fawn


I'm installing kubuntu 7.04 Feisty Fawn, and am having trouble in getting apache2 to start when the system boots.
The symptoms are as follows (all commands entered as root):

upon reboot: apache2 is not running
/etc/init.d apache2 start
/* apache2 is still not running. */

apache2ctl start
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
/* apache2 up and running */

I've checked that there is a symlink to /etc/init.d/apache2 in /etc/rc0.d:
lrwxrwxrwx 1 root root 17 2007-07-27 18:31 K09apache2 -> ../init.d/apache2

___________________________________________________________

Some background which may be relevant:
___________________________________________________________

Before becoming aware of the problem, I had installed several applications without reboot, using adept_manager:
(1) updated all new packages
(2) firefox
(3) mysql-server
(4) mysql-admin
(5) apache2
*** apache2 appeared to be working, http://localhost showed the apache2 install page, and the files were found in /var/www
(6) gallery2
*** I noticed that php5 appeared to have been installed automatically, due to dependencies?
(7) modified /etc/network/interfaces, to get a fixed ip address:
*** replaced "iface eth0 inet dhcp" with
*** iface eth0 inet static
*** address 192.168.0.32
*** netmask 255.255.255.0
*** gateway 192.168.0.1
(8) did a reboot, comfirmed that the ip-address was set correctly, and that I could access the internet
(9) made a symlink to the gallery2 directory in /var/www, navigated to http://localhost/gallery2
*** At this point, I noticed that something was wrong.
*** php files were not recognized properly, firefox wanted to download them.
*** After a while I discovered that apache2 was NOT running, however apache was.
(10) uninstalled apache
(11) apt-get install apache2
*** Now, apache2 was running, and I'm 99.9% certain that /etc/init.d/apache2 start|stop|restart worked
(12) Proceeded with installation of gallery2, without any problems, except that three modules needed configuring.
*** o The Dcraw module was installed, but needs configuration to be activated
*** o The URL Rewrite module was installed, but needs configuration to be activated
*** o The Gd module was installed, but needs configuration to be activated
(13) installed mediawiki1.7, symlinked to the install directory, and confirmed that the setup page seemed to be working, but did not proceed with the setup.
(14) Tried to fix the three gallery2 modules, installed dcraw, configured it, appeared to be ok.
(15) attempted to fix the url rewrite problem...
*** The message was: For whatever reason, Gallery did not detect a working mod_rewrite setup.
(15 cont) ...by symlinking from /etc/apache2/mods-enabled to /etc/apache2/mods-available/rewrite.load
(16) /etc/init.d/apache2 restart

This is when I discovered the problem described initially.
/etc/init.d/apache2 start|stop|restart did not start apache2
Rebooting did not fix the problem.
However, apache2 -k start and apache2ctl start worked.
___________________________________________________________

I'd be very grateful for assistance on how to proceed.

Last edited by NorwegianBlue; 07-29-2007 at 06:51 AM.
 
Old 07-29-2007, 06:50 AM   #2
NorwegianBlue
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Smile SOLVED - apache2 does not start

Here's how I proceeded:
grepped relevant files in /var/log and /var/log/apache2
(nothing, the system did not even appear to attempt starting apache2)

dpkg-reconfigure apache2
(no luck)

dpkg-reconfigure apache2-mpm-prefork
(no luck)

I then copied /etc/init.d/apache2 to a separate directory, and inserted echo "CHECKPOINT A", B, C ... etc statements, to find out why it did not reach the apache2ctl start statement.

The culprit was:
Code:
if [ "$NO_START" != "0" -a "$1" != "stop" ]; then
        [ "$VERBOSE" != no ] && log_warning_msg "Not starting apache2 - edit /etc/default/apache2 and change NO_START to be 0.";
        exit 0;
fi

/etc/default/apache2 looked like this:
Code:
# 0 = start on boot; 1 = don't start on boot
NO_START=1
I did the obvious change, which fixed the problem. In my original query I wrote: "Now, apache2 was running, and I'm 99.9% certain that /etc/init.d/apache2 start|stop|restart worked". Well, my memory must have failed me here, and the 0.1% alternative must have been the one that was true. I've installed apache2 a couple of times previously, it has never been necessary to edit /etc/default/apache2. In fact, I've never heard of it before.

Last edited by NorwegianBlue; 07-29-2007 at 06:54 AM. Reason: Silly mistake in previous post
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stuck In Real Player 10 Hell, Kubuntu Feisty Fawn rolandjdc Ubuntu 4 04-29-2009 11:09 PM
What do you think of Feisty Fawn? mikieboy Ubuntu 24 06-23-2007 01:54 PM
Kubuntu Feisty Fawn ICS, X360 gets no DNS, laptop gets no internet drache777 Linux - Networking 0 05-12-2007 07:16 PM
LXer: Kubuntu 7.04 (Feisty Fawn) Released LXer Syndicated Linux News 0 04-20-2007 06:01 AM
Feisty Fawn- Ready or not? darklight55 Ubuntu 2 01-12-2007 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration