LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-22-2003, 08:08 PM   #1
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Rep: Reputation: 30
httpd and dhcp won't play nice


Alright...I have a fresh install of RedHat 8.0. The machine it's on is utter garbage, such that if I go into X at all, it starts crashing worse than Windows 95, so I need to be able to do everything from the command line. That's OK, because the machine's a server.

Now, httpd will run fine as long as eth1 (the NIC that goes out to the internet) is not plugged in. Since the server is doing NAT for me, I pretty much need eth1 to be active.

As soon as I get a dhcp lease from my ISP, though, it changes my hostname, and httpd won't start. It says "http: could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName"

I went and edited /etc/httpd/conf/httpd.conf and uncommented the ServerName line and set it to 192.168.0.1:80 (That's the IP address bound to eth0, the internal interface). Now when I try to do httpd -k restart, all it says is "httpd not running, trying to start"

It fails, because httpd isn't running afterwards, but it won't give me any error messages. I try httpd -k start, and I get no messages whatsoever.

I'm pretty sure it's the dhcp-set hostname that is frigging up apache, but I need to be able to do NAT and httpd at the same time.

I don't particularly care if clients out on the web can see what's on my web server, as long as Windows clients on my LAN can.
 
Old 09-22-2003, 11:36 PM   #2
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
change the listen line on your httpd.conf files to reflect the ip address
Listen 192.168.0.1:80
safe and exit
edit the /etc/hosts file
and add this line
192.168.0.1 localhost.localdomain localhost
safe and exit

then type
service httpd stop
service httpd start
 
Old 11-17-2003, 06:44 AM   #3
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Original Poster
Rep: Reputation: 30
I hit the same problem on a different machine; Going through those steps eliminates error messages when I try /usr/sbin/httpd -k start, but it still doesn't work.

if I try /usr/sbin/httpd -k restart, I get "httpd not running, trying to start"

I'm sure there's got to be a log somewhere that tells me what happened, but I don't know where it is.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't Flash play nice with aRts like everything else? squirrels Linux - Software 13 10-17-2005 09:11 AM
Ubuntu and Xorg don't play nice adamb10 Ubuntu 9 07-06-2005 11:25 PM
do fc2 and nforce2 play nice together? Motown Fedora 8 01-28-2005 06:29 AM
Anyone getting Suse 9.0 and Vmware to play nice? Caeda Linux - Software 1 12-10-2003 07:35 PM
RedHat 8.0 is nice!BUT i can't play mp3 in it... Leonadia Linux - Software 3 10-12-2002 04:03 AM


All times are GMT -5. The time now is 11:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration