
|
View Full Version : Apache configuration problem
blazenet 07-09-2002, 07:33 AM Hello,
I received my new FreeBSD server yesterday (yay! cheers myles! :)) , and I'm trying to properly configure Apache 1.3.26 on it.
At the first Apache wouldn't even start, and I tried looking at /var/log/httpd-error.log , and saw the following line:
[Tue Jul 9 19:23:02 2002] [alert] mod_unique_id: unable to gethostbyname("")
So I disabled mod_unique_id, and it did start then. However, as you might understand, I'm not quite happy with this solution and want to know the cause of this problem. Why is this problem happening? I tried looking in httpd.conf for "empty" host names specified, but could not find anything.
I also just plainly specified the IP address of my machine instead of the hostname, since my hostname still links to my old IP.
Anyway, anyone has any idea where this problem is coming from and how to fix it?
Thanks in advance.
Regards,
Leon Mergen
MotleyFool 07-09-2002, 07:46 AM You need to specify a hostnaem for the server that resolves to the desired IP on the server. If 1.2.3.4 is your server IP and foo.xanadu.com is the hostname, put an A record mapping foo.xanadu.com to 1.2.3.4 in xanadu.com's zone records
Alternately use your IP directly in httpd.conf
blazenet 07-09-2002, 07:48 AM Problem is, like I stated in my first post, I used my direct IP instead of a hostname to avoid this problem.
But the strange thing is, it seems like it tries to resolve an empty hostname ...
MotleyFool 07-09-2002, 08:01 AM Have you put anything in httpd.conf like ServerName ?
Also turn HostnameLookups Off [mind the case]
blazenet 07-09-2002, 08:03 AM These were already set :
ServerName 66.250.86.124
HostNameLookups Off
Any idea what another problem could be that's causing this?
blazenet 07-09-2002, 09:36 AM Hmmmm... I tried installing proftpd too, but that gives me this problem:
# ./proftpd
- Fatal: unable to determine IP address of ''.
#
Basically, especially due to this, I have the feeling something is terribly misconfigured on my server.... anyone has any idea what the problem could be?
Thanks in advance...
allera 07-09-2002, 09:53 AM When you type 'hostname' from the command prompt, what do you get? Similarly, what's the 'hostname' line in your /etc/rc.conf?
blazenet 07-09-2002, 12:19 PM % hostname
% cd /etc
% cat rc.conf
# -- sysinstall generated deltas -- # Tue Jul 9 02:41:21 2002
# Created: Tue Jul 9 02:41:21 2002
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
addhostname="localhost.localdomain"
ifconfig_xl0="inet 66.250.86.124 netmask 255.255.255.128"
defaultrouter="66.250.86.1"
kern_securelevel_enable="NO"
nfs_reserved_port_only="YES"
sendmail_enable="YES"
sshd_enable="YES"
usbd_enable="YES"
%
hostname empty.... doesn't look too good to me... any idea how I can fix this?
allera 07-09-2002, 12:26 PM Give your box a name. It needs a name. :)
# hostname host.domain.com
and put
hostname="host.domain.com"
in your /etc/rc.conf (take out that addhostname line). If your domain.com doesn't have any dns so that the host.domain.com can resolve to an IP properly, use your /etc/hosts file:
IP HOSTNAME
ex: 1.2.3.4 host.domain.com
Hope that makes sense and helps!
blazenet 07-09-2002, 12:30 PM so if I am going to host the domain foobarwombat.com on my box, and it currently is registered with its dns to the ip 4.3.2.1 ...
And if I add it to /etc/hosts , it will not lookup the IP with its DNS anymore, right?
blazenet 07-09-2002, 12:36 PM nvm, already fixed it...
thanks a lot allera, I really appreciate it (since it saves me a few hours before my host wakes up :))
allera 07-09-2002, 12:38 PM Good stuff. :)
bobcares 07-09-2002, 12:42 PM HI!
allera you have really solved this issue very well..
I'm very impressed by the way you suggested the entire solution to leon....
Have a great day :)
Regards
Amar
blazenet 07-09-2002, 01:47 PM Yes, I must say, it was a really good way...
Thumbs up! :)
porcupine 07-09-2002, 01:58 PM *yawns* *stretches* (late nite, customer needed cpanel help till 4 am), man, i gotta start using WHT as my tech forum obviously :D
allera 07-09-2002, 02:06 PM Thanks, guys. :)
blazenet 07-09-2002, 02:18 PM Originally posted by porcupine
*yawns* *stretches* (late nite, customer needed cpanel help till 4 am), man, i gotta start using WHT as my tech forum obviously :D
Lol, nothing against your forums, Myles, but I just tought that I would have my problem fixed sooner this way...
porcupine 07-09-2002, 02:26 PM oh definatly, like 11 users on our forums, compared to what, 16200 or so on WHT, no question about it there :D, and no complaints about it here, it's the logical choice for free tech support, the more that see it, the faster you get your answers.
|