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. |
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 |
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. |
All times are GMT -5. The time now is 05:25 AM. |