apache virtual host problem

Ashley Benton meggalen at gmail.com
Sun Feb 3 23:34:57 UTC 2008


Hi,
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. I tried
different ports and it didn't change anything. Your help would be welcome as
I don't see what I can add or where to add something or do I need to delete
something???
I am using Ubuntu Desktop 7.10 and the 3 sites have been enabled sudo
a2ensite example1.com  ,  sudo /etc/init.d/apache2 restart for each one of
them separately

This is the base configuration of my files, every different host will have
the same thing except for server name, server alias, and root directory.
VirtualHost *
<VirtualHost * >
        ServerName Example.org
        ServerAlias Example.org *.Example.org
        ServerAdmin webmaster at localhost

I tried to add the following lines in /etc/apache2/http.conf
ServerName localhost
ServerName www.example1.com
ServerName www.example2.com
ServerName www.Example.org

and also add the following to /etc/hosts
127.0.0.1       localhost
127.0.1.1       galen-desktop
publicIP(I wrote the number, not publicIP)    example1.com *.example1.com
publicIP
example2.com*.example2.com
publicIP
Example.org*.Example.org

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
~

Apparently, nothing helps. The first site is a web page on internet, the
others can be on private network or public, that doesn't really matter at
the time. 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?
Thank you
Meg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080203/b680e982/attachment.html>


More information about the ubuntu-users mailing list