Red Hat Bugzilla – Bug 5829
localhost not valid for cgi-bin
Last modified: 2008-05-01 11:37:52 EDT
Netscape is only where the presenting problem occurs.
in 5.0, when I typed http://localhost/cgi-bin/guestbook.pl
into the URL slot, my cgi form came up fine.
in 6.0, when I type precisely the same string, netscape
can't find the URL.
On the one hand, I feel dumb not knowing the right formula
to do this now. On the other hand, something that worked
for me is now 'broken'.
Thanks for your help,
What does your apache configuration look like?
------- Additional Comments From 10/15/99 12:32 -------
the /etc/httpd/conf/*.conf files are vanilla redhat. I don't know if
there's any way to attach files to this 'bug' report. I did email the
.conf files to the assigned address.
The ScriptAlias line is:
ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/
The problem is that localhost is not recognised as a valid server.
I've just changed httpd.conf, so LogLevel is debug, typed
Found that it was expanded to:
which, of course, was not found. Got message:
The requested URL /cgi/guestbook.pl was not found on this server
Apache/1.3.9 Server at www.localhost.com port 80
Hope this provides some extra clues.
What does your /etc/hosts look like?
/etc/hosts is vanilla:
127.0.0.1 localhost localhost.localdomain
what does /etc/nsswitch.conf & /etc/resolv.conf say?
search cpinternet.com uslink.net
Summary of /etc/nsswitch.conf:
passwd, shadow, group: files nisplus nis
hosts : files nisplus nis dns
services, networks, protocols, rpc, ethers, netmasks, bootparams
: nisplus [NOTFOUND=return] files
netgroup, publickey : nisplus
automount, aliases : files nisplus
At a guess, might I need a localhost entry in my resolv.conf, and/or a
tweek to the hosts entry in nsswitch.conf? Or something completely
Hmm... it all looks sane. With similar setup, it works fine here.
Hi, I'm back.
I've cast around the various newsgroups and bug systems of netscape,
apache, etc. One person had a problem that sounded similar to mine, so
I asked s/he how they got over it.
They had added the following lines to /etc/rc.d/rc.local:
ifconfig lo up
route add -net 127.0.0.0 netmask 255.0.0.0 lo
I tried that, but that part of the startup didn't work:
SIOCADDRT: No such device
rc: Starting local failed
I have seen the SIOACADDRT message before, but had no idea what it was
about. It suggests that this is the problem, and that there's
something not quite right with some part of the rc init stuff.
Got any ideas? Thanks for your help.
Mike: you definitely have some sort of name lookup misconfiguration,
as installs out of the box work fine. This isn't a bug, it is a
Well, I think the 'problem' is in the RH installation script. At one point you
are asked whether you want to set up for a local LAN. I didn't - just wanted PPP
- and that caused (I think) this problem and one other. Because I didn't do the
LAN setup, identd, (from netkit-base?) wasn't set up for me. That's usually OK,
but because of some work I'm doing, I'm connecting to a machine with PPP, but
because of their security, they require a static IP address, which requires
Secondly, commands to set up lo were missing from my init.rd (etc...) command
files. I was advised to add:
ifconfig lo 127.0.0.1
route add -host 127.0.0.1 lo
to one of the startup scripts, and the problem went away.
I think the solution is either to warn people at installation time that they
might need some of the LANish components even if they're not on a LAN; or to
figure out a better base for what people need even if they don't want to set up
This has caused a great deal of heartache for me.