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 |
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. |
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? |
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 |
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.
|
All times are GMT -5. The time now is 08:32 PM. |