apache virtual host problem
Ashley Benton
meggalen at gmail.com
Tue Feb 5 03:42:56 UTC 2008
Thank you, I will try that tomorrow morning, but I thought that a2ensite
site name was the same thing that a soft link. I read that a few times when
searching how to make apache2 works with more than 1 virtual host, is it
wrong?
Sincerely
Meg
On Feb 4, 2008 10:07 PM, Kim Briggs <patiodragon at gmail.com> wrote:
> On 2/4/08, Derek Broughton <news at pointerstop.ca> wrote:
> > Ashley Benton wrote:
> >
> > > Sorry I have NameVirtualHost 192.168.0.105 on the first line and
> > > <VirtualHost 192.168.0.105 > on the second line.
> > > Meg
> >
> > Karl's leading you astray...
> >
> > One only needs NameVirtualHost to specify an IP if you have multiple
> > interfaces to the Internet. For this, and almost certainly for your
> > production version, you want:
> >
> > NameVirtualHost *
> >
> > <VirtualHost *>
> > ServerName example.org
> > ...
> > </VirtualHost>
> >
> > <VirtualHost *>
> > ServerName another.org
> > ...
> > </VirtualHost>
> >
> > From your original mail:
> >
> > > 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
> >
> > That's bad :-) You want the ServerName directives for each virtual host
> > _only_ within the <VirtualHost> definition.
> >
> > (and we don't ever modify http.conf! - put each virtual host config in a
> > separate file in /etc/apache2/sites-enabled)
> > --
> > derek
> >
> Yes, if you are using the latest Ubuntu with apache2, you should
> definitely be using "sites-enabled", but normally you put the files in
> "sites-available" and then turn them on and off with soft-links. Here
> is a complete "how-to" for a development machine:
>
>
> http://kimbriggs.com/computers/computer-notes/linux-notes/apache2-public_html-virtual-directories.file
>
> cheers,
> --
> http://kimbriggs.com
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080204/1a40caa6/attachment.html>
More information about the ubuntu-users
mailing list