Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

RedHat 9 - Apache wont Start

Posted on 2003-11-02
7
Medium Priority
?
1,693 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

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…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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

618 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