Jump to content

Hostname vs Full IP


Guest giap01
 Share

Recommended Posts

Guest giap01

All,

I just got MD 9.1 going on a new 'smokin fast' machine and I need a little help.

I have: 3 windows 98 and the MD box all hooked up to a Linksys router.

I have: Changed the hostname on the MD box to 'jughead'.

I can: http://192.168.1.101 to the MD box and I get the default Apache screen.

I cannot: http://jughead

I also cannot: (in a DOS command window) ping 192.168.1.101 (curious!)

 

When I changed the hostname I did it at the command line as root and in the /etc/hosts file and the /etc/sysconfig/network file.

 

/etc/hosts file contents:

127.0.0.1 localhost

192.168.1.101 jughead

 

/etc/sysconfig/network file contents:

HOSTNAME=jughead

NETWORKING=yes

 

When I: type hostname at the command prompt I get: jughead

 

I have: restarted the network with 'service network restart'

 

still no dice.

 

I want to be able to put an index.html file on the MD box and have all my windows boxes hit the MD box with http://jughead as the startup page, th th th that's all folks.

 

What else do I have to do?

 

Thanks for any help.

Pat G.

Link to comment
Share on other sites

Just to kind of explain what's happening: when you type something into a browser, unless it's just the IP (192.168.1.101 in this case - linksys cable/dsl router?) it will try to contact a DNS (domain name server) to resolve the name. You don't have one on your local network, nor do you want one! :-) besides, your systems are setup to try to contact your ISPs DNS, so it won't recognize your system on the inside network.

 

steves suggestion should work, but if you can't find the hosts file just use the search tool to find it.

 

as for the pinging, no clue here either.

Link to comment
Share on other sites

Guest giap01

Got it!

I found the hosts file. It was named hosts.sam. I put the IP and the box name in there, took off the extension and WHAM! I could hit my Linux box by typing in the hostname.

 

Thanks guys,

Pat G.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...