Solved

RedHat 9 - Apache wont Start

Posted on 2003-11-02
7
1,688 Views
Last Modified: 2013-12-06
Hello Linux Experts,

I've installed Red Hat Linux 9 yesterday and its primary purpose is to be a http server ...

except when i try to start apache i get an Apache Refused to Start  error.
I doubt its something in the config because i used the default config ....

anybody know?

Cheers
0
Comment
Question by:11ods
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 2

Expert Comment

by:aleshm
ID: 9666741
What do the logs say?
I dunno where RH stores it's logs but have a look at error_log, you might find something useful there.

Also try running apachectl configtest  to test your httpd.conf.

A.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 125 total points
ID: 9666782
With the default configuration of Apache on RedHat 9 the most common failure to start would be that httpd isn't able to determine the hostname from the IP of the machine. If other wods if you you do an 'ifconfig eth0' to get your machine's IP you need to be able to get the hostname from 'host eth0's-IP'.

If the DNS you use doesn't define a PTR record for your IP you can "work around" the problem by adding a hosts file record. Assuming your hostname was my-srv.dom.tld with an IP of 1.2.3.4 the hosts file should look like:

127.0.0.1     localhost.localdomain localhost
1.2.3.4         mysrv.dom.tld my-srv
0
 

Author Comment

by:11ods
ID: 9667815
hmmm...

Your gonna have to help me out a little on this one.. i'm really new to linux..

1) Nothing in the apache logs regarding this startup error...
2) i'm running this from behind a router in a home network wich uses DHCP.. does this effect anything?
3) where do i put the hostname file? and what do i name it?
4) where do i find out if the machine is able to determine the hostname?

sorry .... and Thanks !

-11ods
0
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 
LVL 12

Expert Comment

by:paullamhkg
ID: 9667903
3) the hosts name file is in /etc/ called 'hosts'

4) if you ping mysrv.dom.tld it should show you the IP 1.2.3.4 following the eg of jlevie.
0
 
LVL 12

Assisted Solution

by:paullamhkg
paullamhkg earned 125 total points
ID: 9668033
2) do you mean your RH9.0 using the dhcp to get the IP? if yes, try to give it a static IP and run the test, you can using ifconfig to add the IP or edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 as below

assume your IP is 1.2.3.4

DEVICE=eth0
BOOTPROTO=static
BROADCAST=1.2.3.255
IPADDR=1.2.3.4
NETMASK=255.255.255.0
NETWORK=1.2.3.0
ONBOOT=yes

and chang the /etc/hosts as jlevie suggested and try again.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 9668245
On a home network it is very unlikely that you'd have a DNS server that would provide the IP-name mapping that Apache needs. As paullamhkg suggests you do need a static IP on the Linux box if you expect to access your web server from any other system. Do configure the router to reserve the IP that you statically assign to the Linux box so that it won't try to assign that IP to some other system.
0
 

Author Comment

by:11ods
ID: 9669991
thanks!

i changed the hosts file, AND gave it a static IP. (10.0.0.9)

and now its running great....


Now my only problem is routing from the router to the linux box on port 80...

but  thats a whole new topic area...

Thanks again!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question