Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Internet Explorer / July 2004



Tip: Looking for answers? Try searching our database.

Hosts file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony Talmage - 14 Jul 2004 14:04 GMT
I'm trying to map an IP to a specific domain in the local Hosts file on my
G5, but nothing I do seems to work.  All the documentation I've read about
the Hosts file makes it seem very straightforward, but my mapping just
doesn't take effect.  Specifically, my problem is accessing a web server on
our local network by domain name instead of IP, which I cannot do without
mapping the domain name.  The entry in my Hosts file is <domain name> A <IP
Address> - is this correct?  My default entry seems to conform to this
pattern: localMachine.localDomain.com A 127.0.0.1 .  I am sure the domain
name and IP address I'm using are correct and spelled properly, so I would
think things would work.

Any information would be appreciated, as access to my entire local web
server is impossible until this is resolved.  TIA.

Signature

Tony Talmage
Web Developer
Graphic Education Corporation
URL: http://www.graphiced.com
Phone: (888) 354-6600

William Smith - 15 Jul 2004 04:41 GMT
> I'm trying to map an IP to a specific domain in the local Hosts file on my
> G5, but nothing I do seems to work.  All the documentation I've read about
[quoted text clipped - 9 lines]
> Any information would be appreciated, as access to my entire local web
> server is impossible until this is resolved.  TIA.

I don't know how you're editing your Hosts file but you can use the
Netinfo utility found in the Utilities folder to verify your entries are
entered correctly (they should appear here) and possibly add your
entries through this GUI if they don't appear.

Open the application and look for the "machines" entry. You'll see a
"localhost" entry that you can pattern your new entries after.

Hope this helps! bill
Signature

William M. Smith
(Microsoft Interop MVP)

Tony Talmage - 15 Jul 2004 13:50 GMT
I was just using SimpleText to edit the Hosts file, but I just realized it's
from the "System Folder" directory instead of "System", meaning I was just
manipulating the OS9 Hosts file anyway.

Anyhow, I cannot get the entry in NetInfo to function, and the only
documentation I've been able to find on adding entries into the /machines
domain involves setting up local information -- that is, the process usually
involves "copy localhost, change the name and IP".  However, I don't want
this new entry to point to a folder on my machine, I want it to point to a
machine on the network.  Do I need to change the "./local" entry to
something else?  I noticed that the broadcasthost had "../network" as it
"serves" value, but changing my new domain to ../network help, either.

Any suggestions?

Signature

Tony Talmage
Web Developer
Graphic Education Corporation
URL: http://www.graphiced.com
Phone: (888) 354-6600

> > I'm trying to map an IP to a specific domain in the local Hosts file on my
> > G5, but nothing I do seems to work.  All the documentation I've read about
[quoted text clipped - 19 lines]
>
> Hope this helps! bill
William Smith - 16 Jul 2004 03:59 GMT
> I was just using SimpleText to edit the Hosts file, but I just realized it's
> from the "System Folder" directory instead of "System", meaning I was just
[quoted text clipped - 8 lines]
> something else?  I noticed that the broadcasthost had "../network" as it
> "serves" value, but changing my new domain to ../network help, either.

Hi Tony!

When you're creating and using a Hosts file it's for the full intent of
referencing your local computer for information about the remote
computer. This is normal.

I don't quite understand what you're referring to when you mention
pointing to a folder on your machine. Entries in the NetInfo Manager
application may be contained in a folder-like hierarchy, but this is
only for appearance's sake.

With "machines" highlighted, choose Directory --> New Subdirectory. With
"new_directory" selected, add two "New Properties" and then use the
"localhost" entry as a guide to modifying your new entry.

localhost
ip_address  127.0.0.1
name  localhost
serves   ./local

example_server_name
ip_address  192.168.0.1
name  example_server_name
serves   ./local

The ./local tells your Mac to use itself to resolve the name of the
server to the IP address.

Hope this helps! bill
Signature

William M. Smith
(Microsoft Interop MVP)

Tony Talmage - 16 Jul 2004 14:13 GMT
William,

Still no success, but I see what the problem is.  Apparently, a hyphen is
not well understood when in the Hosts file, and that is what is throwing
things off (apologies, I have no experience with Unix and didn't realize
this was a problem).  For example, trying to set the server name to
"my-server.mydomain.com", I continue to receive "A connection failure has
occurred" messages.  However, if I simply remove the hyphen to make
"myserver.mydomain.com", the site connects just fine.  Is there an escape
character or something I can use to allow the Hosts to correctly interpret
the hyphen?  Unfortunately I need the local entry for this host to match the
DNS entry for the server - this was my initial intention, as parts of the
html code on the server are hard-coded, and not only can I not see the
server's DNS name that I'm looking for, but I can't cross sessions, which
would still mess things up if I connect to the IP.

Any suggestions for allowing hyphens in the Hosts file, or am I straight out
of luck?

--
Tony Talmage
Web Developer
Graphic Education Corporation
URL: http://www.graphiced.com
Phone: (888) 354-6600

> > I was just using SimpleText to edit the Hosts file, but I just realized it's
> > from the "System Folder" directory instead of "System", meaning I was just
[quoted text clipped - 38 lines]
>
> Hope this helps! bill
William Smith - 18 Jul 2004 02:16 GMT
> Still no success, but I see what the problem is.  Apparently, a hyphen is
> not well understood when in the Hosts file, and that is what is throwing
[quoted text clipped - 12 lines]
> Any suggestions for allowing hyphens in the Hosts file, or am I straight out
> of luck?

Hi Tony!

The escape for Unix is the backslash "\" but I'm unsure how it will be
interpreted in a Hosts file. You can give this a try.

The other option I would suggest is using a CNAME but I couldn't find
any information on how to enter this into the NetInfo Manager.

bill
Signature

William M. Smith
(Microsoft Interop MVP)

Tony Talmage - 21 Jul 2004 19:26 GMT
Unfortunately, the Hosts information doesn't seem to enjoy backslashes.  And
additionally, the cname has a hyphen as well, so even if I knew how to
incorporate cname it wouldn't help.  I suppose I will just have to not use
my g5 anymore for this purpose =)

Signature

Tony Talmage
Web Developer
Graphic Education Corporation
URL: http://www.graphiced.com
Phone: (888) 354-6600

> > Still no success, but I see what the problem is.  Apparently, a hyphen is
> > not well understood when in the Hosts file, and that is what is throwing
[quoted text clipped - 22 lines]
>
> bill
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.