Solved

RedHat 9 - Apache wont Start

Posted on 2003-11-02
7
1,681 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
  • 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now