LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-13-2012, 05:05 PM   #1
musthavelu
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: Disabled
host file two domain name 1 ip address


Hello, I need to map two domain names to one IP address. Is the host file below correct? Are there any other changes I need to make to the resolve file?

127.0.0.1 localhost.localdomain localhost
1.2.3.4 mysite1.com mysite2.com
::1 localhost6.localdomain6 localhost6
 
Old 11-13-2012, 06:25 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
That should work (on that one host only though)

-C
 
Old 11-13-2012, 10:09 PM   #3
musthavelu
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Okay thank you I will try it tomorrow.
 
Old 11-13-2012, 11:14 PM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Although it might work, it's not quite what you're after.
Code:
127.0.0.1 localhost.localdomain localhost
1.2.3.4 mysite1.com
1.2.3.4 mysite2.com
::1 localhost6.localdomain6 localhost6
This needs to be setup on the machines that will connect to the server, not necessarily on the server itself.
 
Old 11-13-2012, 11:52 PM   #5
musthavelu
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I will give that a try Wim, thank you.
 
  


Reply

Tags
dns, hosts, ip address


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the ip address of host in linux with using of host and nslookup command hussain.s Linux - General 4 10-23-2010 09:12 PM
[SOLVED] Mails are being received on host.domain.com but not on domain.com WhisperiN Linux - Server 5 11-26-2009 10:59 PM
DHCPD is updating BIND with <host>.<domain>.<domain>. diabelek Linux - Networking 15 10-11-2007 05:58 AM
Sendmail sending as host.domain.com, i want it to be from just domain.com. PlatinumRik Linux - Software 5 10-07-2004 04:32 PM


All times are GMT -5. The time now is 12:24 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration