[Novalug] how to specify virtual hosts with apache2

Kevin Cole dc.loco at gmail.com
Tue Jan 1 07:14:42 EST 2008


On Dec 31, 2007 11:05 PM, Gopher <gopher at 3wa.org> wrote:
> Nino Pereira wrote:
> > The directory 'sites-enabled' would then have one file like this
> > for 'ecopulse.com', another one for a second web site 'foo.com', etc.
> >
> > Your comments are very welcome. I looked at the www.apache2.com web site
> > for information, but I'm not knowledgeable enough to understand what
> > it's trying to tell me.
> >
> > Thank you,
> You are correct.  Copy the 000-default file to 'ecopulse.com' and change
> accordingly, and continue as needed for all other sites you need as
> Virtual Hosts on the same IPs. Then restart your apache2 server and
> watch your apache error log for issues.
>
> BTW, the directory layout you are looking at is an Ubuntu thing, not an
> Apache thing.  IMHO Ubuntu (Debian?) made this configurable but rather
> confusing and overly complicated.  Personally, I just set up an entire
> different set of directories
> (/data/servers/www.foo.com/[bin|config|logs|pages|etc....]) and create
> all new config files without any Includes.  And finally I create new
> start up scripts under /etc/rc2.d and disable the default start scripts.
>   I think it just makes it all much easier.

You probably want to copy /etc/apache2/sites-available/default, rather
than /etc/apache2/sites-enabled/default-000 and then make the symbolic
link to it in/etc/apache2/sites-enabled/.  (See /usr/sbin/a2ensite or
just make the link the old-fashioned way.  See also
/usr/sbin/a2enmod.)

-- 
Ubuntu Linux DC LoCo
Washington, DC
http://dc.ubuntu-us.org/


More information about the Novalug mailing list