LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2005, 01:52 AM   #1
abdul_zu
Member
 
Registered: Feb 2005
Posts: 71

Rep: Reputation: 15
localhost.localdomain problem


Hi Guys,

This is my first thread in this forum.

I have a little question.

I installed Redhat7.3 with htppd and mysql and postgresql, on one of machine in my office LAN. if i am trying to access 196.198.0.1/test/test.htm it is working well on the same machine, i means where i installed the Redhat. but when i am trying to access the same URL in diffrent windows machine i am getting the message :

localhost.localdomain could not be found please check the name and try again.

Yours reply will be vey high appriciation.

Thank You
abdul
 
Old 02-28-2005, 02:14 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might want to check the windows hosts file. localhost.localdomain should refer to 127.0.0.1.
 
Old 02-28-2005, 02:17 AM   #3
abdul_zu
Member
 
Registered: Feb 2005
Posts: 71

Original Poster
Rep: Reputation: 15
Hi,

Can you tell me where i can find the windows hosts file. and what will be the configuration?

i am so sorry because i am new in linux box.

Thank You
 
Old 02-28-2005, 12:45 PM   #4
TimmyWa
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Rep: Reputation: 0
Home webserver

Hi Pros,

I do have the same problem too. I can access test page from the PC where I install Red hat 9.0, but can't from another windows PC on the same LAN. All PCs are connect to linksys router, and forwardind port 80 for the apache webserver PC. Please help. Thanks.
 
Old 02-28-2005, 04:30 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
It depends on which windows you are using.

For NT it will be at C:\WINNT\system32\drivers\etc\hosts

For XP C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS

For windows 98, it is in C:\WINDOWS\HOSTS

The localhost entry should look like:
127.0.0.1 localhost

You can add an alias at the end:
127.0.0.1 localhost localhost.localdomain

Your entry may have an alias added that is the name of your linux box.
If your linux box uses a static address you could add an entry for it in the hosts file. If it uses DHCP, then there shouldn't be any reference to the linux hostname in either the hosts or lmhosts file. The LMHOSTS file is in the same directory as the HOSTS file.


One sidenote: This is a technique used to block access to a computer. By having the website name defined as localhost, the computer will use the localhost (itself) address instead of getting the IP address from the DNS server.

Last edited by jschiwal; 02-28-2005 at 04:40 PM.
 
Old 02-28-2005, 11:01 PM   #6
abdul_zu
Member
 
Registered: Feb 2005
Posts: 71

Original Poster
Rep: Reputation: 15
HI,

Still no success i changed the following in windows 2000 host file.
BTW, my linux box having static IP (10.0.0.151)


# Copyright (c) 1993-1999 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# 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
#10.0.0.151 localhost localhost.localdomain
127.0.0.1 localhost localhost.localdomain


Thank You
 
Old 03-15-2005, 04:52 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Change the line
#10.0.0.151 localhost localhost.localdomain
To
10.0.0.151 <hostname of linux box>

You may need to run through the tcp/ip setup on your linux box. The localhost address refers to the loopback device on the same host.
 
  


Reply



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
localhost.localdomain steve007 Linux - Newbie 3 07-27-2005 03:48 AM
localhost name localdomain name assyrian1 Linux - Newbie 9 07-05-2005 04:17 AM
Resolver problem: ping localhost.localdomain gives Unknown host rmd Linux - Networking 0 11-06-2003 07:58 AM
what is localhost.localdomain? boicraig Linux - Software 3 01-11-2003 06:57 PM
localhost.localdomain blankx87@m-i-m. Linux - Newbie 1 11-17-2002 04:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:19 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration