Help with DNS Virtual Hosting

Help with DNS Virtual Hosting

Post by Stephe » Sun, 10 Jan 1999 04:00:00



I have read books and learned all about how DNS works but I can't find a
good example on Virtual Hosting with one IP address. I'm assuming the
files "named.boot" and "named.conf" are the files I need to focus on. I
have over 10 virtual hosts on one IP address. Anyone willing to help me
out on this is a life saver. I just want one good example and I'm a
happy man!

Thanks in advance.


 
 
 

Help with DNS Virtual Hosting

Post by Rick William » Mon, 11 Jan 1999 04:00:00


Any replies to your post?  I am having the same trouble finding an example.
:-(


> I have read books and learned all about how DNS works but I can't find a
> good example on Virtual Hosting with one IP address. I'm assuming the
> files "named.boot" and "named.conf" are the files I need to focus on. I
> have over 10 virtual hosts on one IP address. Anyone willing to help me
> out on this is a life saver. I just want one good example and I'm a
> happy man!

> Thanks in advance.



--
/********************************************************\
|         Rick Williams         + Good things come       |
|     System Administrator      + to those who wait...   |
| Alternative Internet Concepts +                        |
|         417.667.4573          + As long as             |

\********************************************************/

 
 
 

Help with DNS Virtual Hosting

Post by greyma » Tue, 12 Jan 1999 04:00:00


I don't think you have to do anything special. I assume that virtual hosts
use different port numbers for the www interface so just give each virtual
host in DNS the same IP or maybe CNAME. This is an example from my zone
file:

(I have used *.*.*. instead of real IP address)
    eden            IN      A       *.*.*.130

    www     IN      CNAME   eden.gmcs.com.au.
    mail    IN      CNAME   eden.gmcs.com.au.
    ftp     IN      CNAME   eden.gmcs.com.au.

Greyman


>I have read books and learned all about how DNS works but I can't find a
>good example on Virtual Hosting with one IP address. I'm assuming the
>files "named.boot" and "named.conf" are the files I need to focus on. I
>have over 10 virtual hosts on one IP address. Anyone willing to help me
>out on this is a life saver. I just want one good example and I'm a
>happy man!

>Thanks in advance.



 
 
 

Help with DNS Virtual Hosting

Post by Alex Kamantausk » Wed, 13 Jan 1999 04:00:00



> I have read books and learned all about how DNS works but I can't find a
> good example on Virtual Hosting with one IP address.
> I'm assuming the files "named.boot" and "named.conf" are the files I
> need to focus on.

I think its a web configuration issue.  All that DNS can do is assign the
hosts to an IP address.  It won't be able to determing port addressing or
anything like that.

Quote:> I have over 10 virtual hosts on one IP address.

Are they all on the same domain name, or separate domain names?

If all on the same domain name, then you just need to create one zone file
(for the domain name), with the following host records:

        foo.com.        IN A            10.0.0.1
        host1           IN CNAME        foo.com.
        host2           IN CNAME        foo.com.
        host3           IN CNAME        foo.com.

That will map host1.foo.com to point to 10.0.0.1, host2.foo.com to
10.0.0.1, etc.

If they are all separate domain names, then create a zone file for each
one and have an A record pointing to the IP address.

Then configure your web server (if Apache 1.3.3+) like such for each
virtual host:

        NameVirtualHost ##.##.##.##
        <VirtualHost host.some_domain.com>

        DocumentRoot /www/docs/host.some_domain.com
        ServerName host.some_domain.com
        ErrorLog logs/host.some_domain.com-error_log
        TransferLog logs/host.some_domain.com-access_log
        </VirtualHost>

>  Anyone willing to help me out on this is a life saver. I just want one
> good example and I'm a happy man!

> Thanks in advance.



--
Alex Kamantauskas
Tugger Networks
 
 
 

1. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

Hello.

Have been running 1.2b8 for a intranet and decided to move upto 1.3b2. I
have several name based virtual hosts that have been working under
1.2b8. After compiling and installing 1.3b2 my virtual hosts do not
work. In fact what happens is that even though DocumentRoot and default
server name is different, eg: www.serverA.net pointing to /www/default,
Apache 1.3b2 will always take me to the first defined virtual host as if
it's locked to it no matter what virtual host I try to browse. What
gives? Please post and E-Mail.

In /etc/hosts for my machines IP address I have

A.B.C.D         www.default.net www.virtA.net www.virtB.net

In ../conf/httpd.conf I have;

<VirtualHost www.virtA.net>

DocumentRoot /usr/local/www/virtA
ServerName www.virtA.net
ErrorLog logs/virtA.error.log
TransferLog logs/virtA.access.log
</VirtualHost>

<VirtualHost www.virtB.net>

DocumentRoot /usr/local/www/virtB
ServerName www.virtB.net
ErrorLog logs/virtB.error.log
TransferLog logs/virtB.access.log
</VirtualHost>

--

2. Installing 2nd Ethernet card on Sun Blade 100

3. DNS, Namesever, and Virtual Hosting = HELP!

4. Matrix Melenium....or ATI Pro Graphics...

5. DNS & Virtual Hosting Problem, please help.

6. Transparency fails under RedHat6/Enlightenment

7. FrontPage virtual hosting, removal or reset of virtual host

8. mysql on AIX 4.1

9. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

10. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

11. For Discussion: web virtual hosting vs mail virtual hosting

12. HELP: Virtual domain/Virtual hosts ?

13. DNS and virtual hosts