LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-21-2004, 11:32 PM   #1
vexer
Member
 
Registered: Jan 2003
Location: Sudbury Ontario, Canada
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
/etc/hosts


Would adding a line in /etc/hosts (see below) allow me to browse to the hostname attributed to the ip entry?

Code:
x.x.x.x www.websearch.com
 
Old 11-22-2004, 02:42 AM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
if x.x.x.x is hosting (virtually) websearch.com, then yes... take an example:

i have a dedicated server -- it hostes virtual sites (they share IPs).

when a new customer registers their site, they have to wait up to 2 days for DNS to go through before they are fully online.

but what if they want to work on their site before then?

-- /etc/hosts (and there is also a hosts file for windows)... put in an entry mapping their domain to my IP, and my host does the rest -- apache knows how to handle requests for their domain, so in a sense, all they have to do is ask my IP for their domain, and they get it!

--but if i have not yet put their domain on my host, and they just willy-nilly put stuff in their hosts file... my host won't know where to find their domain....


-- i run apache, and it comes down to the 'virtual host' entry -- basically if your webserver knows about the domain, you should be good...

follow that ramble?
 
  


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
External Hosts Resolve but Local Hosts Do Not kjm9 Linux - Networking 7 11-19-2005 03:51 PM
hosts.allow & hosts.deny question... jonc Linux - Security 9 03-05-2005 09:41 PM
Adding shell commands to hosts.deny and hosts.allow ridertech Linux - Security 3 12-29-2003 03:52 PM
hosts.deny and hosts.allow defaults? gui10 Linux - Security 5 12-20-2001 01:57 AM
hosts.allow / hosts.deny fistz Linux - Newbie 1 04-19-2001 07:00 PM

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

All times are GMT -5. The time now is 11:39 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