LinuxQuestions.org
Help answer threads with 0 replies.
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 06-06-2012, 06:04 AM   #1
l0pht
Member
 
Registered: Sep 2008
Posts: 76

Rep: Reputation: 1
set linux hostname & question about set multiple domain on one ip


hi,
how are u my friend?
i have 2 question:
1: I have a linux server(web) in my office, i explorer it with a local ip 192.168.1.2, how can i view it with a domain ( in local)?
replace ip, type an address.com in browser.


2: i have a vps with an ip, i want to use this vps with 2 domain. each domain point different folders in /var/www .
how can i do that? i installed ispconfig for this but do not work. i need dns server? which dns records?

thanks
 
Old 06-06-2012, 11:29 AM   #2
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
Question 1) In order to view it with domain instead of ip it needs to be put on an internal DNS. If you are on the computer that is hosting web space then you should be able to use localhost, but only from the server that is hosting the web space. If you are looking to have a domain that is relevant to external network users you either need them to point to an external DNS or register the hostname with a company that works with ICANN.

Question 2) Still working on this one I am pretty sure it is done using virtual hosts within the httpd.conf file.
 
Old 06-06-2012, 01:14 PM   #3
l0pht
Member
 
Registered: Sep 2008
Posts: 76

Original Poster
Rep: Reputation: 1
thanks

about your first answer:
i should configure a DNS service? for my local network?

your secound answer:
just add vhost?
nothing dns record needed?
 
Old 06-07-2012, 09:26 PM   #4
danielhilst
LQ Newbie
 
Registered: Apr 2010
Location: Brazil
Distribution: Gentoo,Archlinux
Posts: 18

Rep: Reputation: 0
l0pht, if you need a name for testing you can hardcode a name on your /etc/hosts file, if
you need the name being resolved on your lan, then you need to put it on your local DNS

For second question.. you need two names resolving to same IP, then you can tell to Apache to
chose what virtual host apply based on name used on request.. Take a look at name based Virtual hosts..

Here is some Apache docs telling about it... http://httpd.apache.org/docs/2.2/vhosts/name-based.html

Cheers
 
Old 06-08-2012, 10:14 AM   #5
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
Sorry about delay on getting back to you I was going to say pretty much what danielhilst said. Internal DNS is not necessary, the only drawback is any machine that wants to use that hostname must have it in their /etc/hosts file.
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set multiple domain to one IP asoqa Linux - General 1 02-09-2012 09:35 AM
Hostname and domain name. How do I set them? glore2002 Debian 2 08-17-2009 07:02 PM
Easy Question - set hostname in RH 9 kkempter Linux - Software 2 05-23-2003 03:49 PM
Want to set up a new domain name and hostname? hamster Linux - Networking 6 04-06-2003 12:04 PM
how to set sendmail for multiple domain netkepala Linux - Software 4 10-04-2002 07:38 AM


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