hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : VPS Tutorials : A question regarding etc/hosts
Reply

VPS Tutorials Tutorials related to VPS.
Forum Jump

A question regarding etc/hosts

Reply Post New Thread In VPS Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 06-03-2011, 04:37 AM
jellday jellday is offline
Junior Guru Wannabe
 
Join Date: Jul 2010
Posts: 82

A question regarding etc/hosts


It is said in Linode's doc that:
Quote:
Update /etc/hosts
Next, edit your /etc/hosts file to resemble the following example, replacing "plato" with your chosen hostname, "example.com" with your system's domain name, and "12.34.56.78" with your system's IP address. As with the hostname, the domain name part of your FQDN does not necesarily need to have any relationship to websites or other services hosted on the server (although it may if you wish). As an example, you might host "www.something.com" on your server, but the system's FQDN might be "mars.somethingelse.com."
File:/etc/hosts

Code:
127.0.0.1        localhost.localdomain    localhost
12.34.56.78      plato.example.com        plato
Since it says "the domain name part of your FQDN does not necesarily need to have any relationship to websites or other services hosted on the server", does that mean I can use "plato.somenonexistdomain.com" on the second line?

Does that mean, only the first IP part and the last hostname part is need to be true?

Reply With Quote


Sponsored Links
  #2  
Old 07-04-2011, 04:57 AM
vpswing vpswing is offline
WHT Addict
 
Join Date: Apr 2011
Posts: 153
My knowledge is a little rusty, but yes, you can put anything there in the /etc/hosts file.

Example:
--------

127.0.0.1 localhost.localdomain localhost
xx.xx.xx.xx server1.yourdomain.com server1
yy.yy.yy.yy server2.anotherdomain.com server2


xx.xx.xx.xx is the IP addr. of your VPS - and the FQDN (server1.yourdomain.com) should come first before 'server1'

Subsequent entries (e.g. another IP addr: yy.yy.yy.yy correspond with another domain - yy.yy.yy.yy can be another IP on the same VPS or another server on the internet).

Once you've edited the /etc/hosts, you may need to restart named or nsd3

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/hosts Question paulg1981 VPS Hosting 2 01-14-2008 12:18 AM
Question to Hosts Bling Bling Running a Web Hosting Business 2 08-07-2003 02:40 PM
Question to Hosts DarktidesNET Web Hosting 3 01-11-2003 02:41 PM
question for hosts KG Web Hosting 13 07-19-2001 11:05 PM
A question to all the hosts here.... venomx Web Hosting 3 05-25-2001 09:17 PM

Related posts from TheWhir.com
Title Type Date Posted
Get listed in WHIR Magazine's 6th Annual Hottest Hosts Issue coming in January 2013 Blog 2012-12-28 11:03:01
Living on the edge: why all hosts should offer CDN services Webinars 2012-10-17 15:54:32
Domainchy Helps Web Hosts Tap iPhone Users with New White Label iOS App Web Hosting News 2012-09-12 13:15:54
Tucows' Elliot Noss on the Mobile Opportunity for Web Hosts Web Hosting News 2012-02-16 16:49:36
Get listed in WHIR Magazine's 5th Annual Hottest Hosts Issue coming in January 2012 Blog 2011-10-18 18:35:27


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?