?
Solved

RedHat 9 - Apache wont Start

Posted on 2003-11-02
7
Medium Priority
?
1,692 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 500 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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 500 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month9 days, 2 hours left to enroll

764 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