?
Solved

RedHat 9 - Apache wont Start

Posted on 2003-11-02
7
Medium Priority
?
1,695 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 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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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é.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

839 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