Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apache fails to start under RH7.1



>>>>> "Jean-Christian" == Jean-Christian Imbeault <jean_christian@example.com> writes:

    Jean-Christian> I use /etc/rc.d/init/httpd start.

What are the contents of that file?

    Jean-Christian> That FAILED message seems to be related to my
    Jean-Christian> hostname though. I have no idea what the relation
    Jean-Christian> is though!

That's why I call it "useless."  On Unix, the success flag is 0,
meaning "no news is good news."  Bad news, on the other hand, should
be verbose.

    Jean-Christian> RH has /var/log/httpd and acccess.log, error.log
    Jean-Christian> and ssl_request.log.

Where are the latter three?  Also in /var/log?  What, if anything, do
they have in them?  (Check their dates to make sure they're related to
your recent work.)

    >> Oh.  That's probably /etc/hostname.

    Jean-Christian> Under RH it seems to be /etc/hosts

No.  /etc/hosts is part of the DNS system.  /etc/hostname is something
else.

    Jean-Christian> Which brings me to some observations. I was using
    Jean-Christian> the the following /etc/hosts file

    Jean-Christian> 127.0.0.1	localhost.localdomain	localhost
    Jean-Christian> 10.2.100.85	localhost.localdomain	localhost

This is definitely wrong.  localhost is reserved for the loopback
interface.

    Jean-Christian> I then edited the file to be

    Jean-Christian> 127.0.0.1 localhost.localdomain localhost

    Jean-Christian> And the machine booted fine but apache failed to
    Jean-Christian> start. Also when I log in using Gnome I get an
    Jean-Christian> error about Gnome not being able to look up my
    Jean-Christian> hostname.

Yes.  If your host doesn't have a nameserver to ask, then it has to
look in /etc/hosts for all DNS information.  Do you have a nameserver
configured in /etc/resolv.conf?

    Jean-Christian> - where did the hostname devtwo come from?

My guess is that you typed it into some random GUI configurator,
possibly for the nameserver on the network.

    Jean-Christian> How can I get rid of it?

Depends on where it's coming from.

    Jean-Christian> - why is RH unhappy if I don't put an entry in
    Jean-Christian> /etc/hosts for my ip?

Because some applications (especially IPv6-compliant ones) try to find
out the hostname.  If one of them is started before the network is,
then the only way to find out is a local file.  Or your nameserver may
be screwed up, in which case they'll have problems even if the network
is started.  If it's not a daemon process, then the boot will appear
to hang at that point.

    Jean-Christian> - why can't apache start if the hostname is wrong
    Jean-Christian> in someway?

Any number of reasons.  Virtual hosting, identifying localhost with
real IP addresses for access control purposes, etc.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links