LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-29-2006, 10:49 PM   #1
jmkelm08
Member
 
Registered: Nov 2005
Posts: 33

Rep: Reputation: 15
Computer DNS name


This question is probably easy for any experienced linux user. I'm running Fedora Core 4 with an apache httpd server. Currently I use the ip address to access the server.

Ex. http://192.168.0.36/repo

I want to be able to access this site using something more like: http://MyServer/repo. This server needs to be available to the linux and windows computers on my network only, not the entire internet. Is there an easy way to accomplish this?

Thanks for any help!
 
Old 05-29-2006, 10:59 PM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
The /etc/hosts file does local dns on linux machines. And under Win XP its %WINDIR%\system32\etc\host.

Just put in an IP name pair and you should be going.
 
Old 05-29-2006, 11:57 PM   #3
jmkelm08
Member
 
Registered: Nov 2005
Posts: 33

Original Poster
Rep: Reputation: 15
Do I have to do this on every machine? If so, is there a way to do it where you don't have to change each computer?
 
Old 05-30-2006, 12:05 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Take a look at dnsmasq.

It's a ligthweight DNS Server. Much easier to configure like bind. I just stated the easiest way to accomplish it.
 
Old 05-30-2006, 12:28 AM   #5
jmkelm08
Member
 
Registered: Nov 2005
Posts: 33

Original Poster
Rep: Reputation: 15
Ok, I have it working now. This is what I did:
changed the HOSTNAME field in /etc/sysconfig to "myserver.localdomain"
added "192.168.0.101 myserver.localdomain myserver" to /etc/hosts
I was able to access the server via another computer on the network using http://myserver

Are there any problems with the way I did it that I need to be aware of?
 
Old 05-30-2006, 12:44 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Not really. If you change the IP of your server you need to update the hosts files again. But that's about it.
 
  


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
Why Scourge (2nd computer) isn't getting ip address from Misery (1st computer) dhcp? pslave Linux - Networking 2 04-09-2006 05:58 AM
Can't copy files from an SCO Unix System V computer to a Linux computer gnppapas Linux - General 2 11-27-2004 01:39 PM
can DNS, SMTP and POP3 on the same computer? garychan Red Hat 2 08-30-2004 04:36 PM
Why would a windows computer smoke a linux computer for download speed ? lostboy Linux - General 4 10-21-2003 05:20 PM
How can i portage Linux from computer with Celeron proc to computer with Pentium 166? gdi Linux - General 4 05-31-2003 01:11 AM

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

All times are GMT -5. The time now is 10:05 PM.

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