apache virtual host problem

Karl Auer kauer at biplane.com.au
Mon Feb 4 00:25:25 UTC 2008


On Sun, 2008-02-03 at 18:34 -0500, Ashley Benton wrote:
> I am trying to set up apache2 to see more than one virtual host but
> don't find my error. Each time I try to see one of the three examples,
> Apache served me the first site I configured and can't find the
> others.

It sounds like you didn't use the NameVirtualHost directive.

    ...

    NameVirtualHost <IP address of server>

    ...

    <VirtualHost <IP address of server>>
        ...
    </VirtualHost>

    <VirtualHost <IP address of server>>
        ...
    </VirtualHost>

    ...


> Just one more question, do I need to Buy a DNS if I need them on
> internet later?  and for now do I need to install bind9 and configure
> it?

Name service is needed if you want to find the sites by name. As long as
you are accessing these sites from only one or two machines, you can
use /etc/hosts on those machines, and you can use private addresses.

If you want to go public, and have your sites visible on the Internet,
you will need to obtain public IP addresses, advertise them in the
global DNS, and (obviously) change the Apache config to use those
addresses. A (poor) alternative would be to put the server behind a NAT
and direct all your site names to the same IP address using a dynamic
name server.

Regards, K.
 
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)                   +61-2-64957160 (h)
http://www.biplane.com.au/~kauer/                  +61-428-957160 (mob)

GPG fingerprint: DD23 0DF3 2260 3060 7FEC 5CA8 1AF6 D9E3 CFEE 6B28
Public key at  : random.sks.keyserver.penguin.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080204/f16a96b5/attachment.pgp>


More information about the ubuntu-users mailing list