[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Which web server for multiple domains?

On Thu, 28 Jun 2001, Craig Dickson wrote:

> I've been using the web server Boa, and generally it has done a good job
> without using up too much memory or CPU time. The one thing it doesn't
> do that I now need is to host multiple domains as logically-distinct
> sites. E.g. if someone requests www.domain1.com (not my real domain
> name, btw), I want a different page to come up than if they request
> www.domain2.com, even though the DNS addresses for those sites are
> identical. From the docs, I think Boa could do it if the two sites were
> served through separate network interfaces, but that's not the case
> here. There's one network interface, and the only difference between
> www.domain1.com and www.domain2.com is the domain in the URL (which I
> believe HTTP does provide to the server, so the server should be able
> to differentiate based on it).
> Does anyone know if Boa can do this, or if any of the other servers
> could? (I daresay AOLServer or Apache could, but I'd rather go with a
> smaller, simpler server if it will do what I need).

Hmmm, it sounds like you want the virtual host thing...

- add "VirtualHost" to  /etc/boa/boa.conf

- edit /etc/hosts to look like, say...	you	localhost	other1	localhost	other2	localhost

- setup /var/www to have dirs named, 127.0.0.{1,2,3}

- restart boa

requests for:
http://you/, http://other1/, and http://other2/ will be served out of
localhost/var/www/127.0.{1,2,3}, respectively.

- Bruce

Reply to: