Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

127.0.0.1 can but localhost cannot

Status
Not open for further replies.

rejoice

MIS
Jun 5, 2002
42
0
0
MY
When I access I can see the Apache test page. But, when I access the test page does not appear and wait until timeout.

Can anyone tell me how to fix it?
 
Check your /etc/hosts file it is a simple list of IP addresses and the hostnames that they correspond to.
The hosts file should have an entry for the IP address "127.0.0.1", with the name "localhost" following it.

127.0.0.1 localhost.localdomain localhost

Blizz
 
I have checked the C:\Windows\host.sam the entry is correct. Any other posibility?
 
Don't you need a trailing / i.e.

I love deadlines. I like the whooshing sound they make as they fly by.

Douglas Adams
 
what do you have as servername?


Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
You will need to check the lmhosts file and the hosts file, not the hosts.sam file.
 
ServerName localhost

What should I do with the Lmhosts.sam and hosts.sam file?

The content of hosts.sam
=========================
# Copyright (c) 1998 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
 
I am using Windows 98SE with all the critical updates.
Apache 2.0.47
 
There are 2 hosts files in windows, hosts and hosts.sam. Check to see if the local host entry is in that file.
 
The file name is 'hosts' with no extension. Also the server name entry in the conf must be localhost.
 
I manage to find the hosts.sam only. The other one not found. Can you let me know what's the content?

 
The entry will be the same. Just create a file named 'hosts' in note pad. In fact you can open the 'hosts.sam' file make the entry and save as 'hosts'. Be careful not to save it as 'hosts.txt'
 
You have a hosts file. You will need to go into your folder options and choose to show hidden files.
 
The file may have been deleted on purpose. Microsoft had a workaround for IE that required deleting the file.
 
I tried to save it as hosts, but it still cannot solve the problem.
 
Send me your hosts and lmhosts file...

comtec17@carolina.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top