More specifically, this is called "Name Virtual Hosting".

A very basic entry would be something like:

NameVirtualHost 10.0.0.1
<VirtualHost 10.0.0.1>
ServerName www.a.com
DocumentRoot /home/a-com/html
</VirtualHost>

or you can even do:

<VirtualHost www.a.com>
ServerName www.a.com
DocumentRoot /home/a-com/html
</VirtualHost>

The NameVirtualHost directive must be included for any of this to work.

Don't forget to specify the current name of the machine, ie if it is called
"webhost.somecompany.com" have this entry as well:

<VirtualHost webhost.somecompany.com>
ServerName webhost.somecompany.com
DocumentRoot /var/www/html
</VirtualHost>

Make sure the one for the primary name of the machine goes above all other
domain entries.

A more detailed one would look something like:

<VirtualHost www.a.com>
ServerName www.a.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /home/a-com/html
ErrorLog /home/a-com/logs/error_log
CustomLog   /home/a-com/logs/referer_log    "%{referer}i"
CustomLog   /home/a-com/logs/agent_log     "%{user-agent}i"
TransferLog /home/a-com/logs/access_log
<Directory /home/a-com/html>
Options Indexes Includes FollowSymLinks
</Directory>
</VirtualHost>

If you need more help with the apache side, just let me know
(I think this should also make it to my faq page one of these days).

As far as smtp, not sure how exactly one handles multiple virtual domains,
since I've never needed to do that.

Michael

--
Michael Viron <[EMAIL PROTECTED]>
Core Systems Group
Simple End User Linux

At 06:57 PM 5/1/2002 -0500, you wrote:
>This should have went to the list. Sorry about this...
>
>Dr John
>
>-------- Original Message --------
>Subject: Re: [expert] Multiple Web Server & Mail Servers on one box
>Date: Wed, 01 May 2002 18:27:11 -0500
>From: "J. Craig Woods" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>References: <[EMAIL PROTECTED]>
>
>Ran Hooper wrote:
> > I've successfully setup Mandrake to host one domain, one website 
>domain and
> > one email domain. Relatively easy stuff.
> >
> > Is it possible using Mandrake to setup Apache to host multiple 
>domains? I'm
> > talking three public and one private. I believe this is called virtual
> > hosting but I'm not 100%.
>
>Yep, that is what it is called, and you can set that up in your Apache
>config files. Look at httpd.conf and commonhttpd.conf for this kind of
>setup.
>
> >
> > www.a.com
> > www.b.com
> > www.c.com
> > www.d.com
> >
> > In this same vein can I also host the email for three separate 
>domains too?
>
>Although there may be several approaches to accomplish this, I would
>suggest using the most straightforward and simple approach. Set up a DNS
>server, and make the appropriate records in your foward and reverse zone
>files. You can have MX records indicate which mail servers handle which
>domains (read up on dns setup and administration).
>
> >
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> >
> > Well you get the idea I'm sure. I'm thinking you might need multiple IP's
> > and multiple nics, which isn't a concern.
> >
> > Regards,
> >
> > Ran Hooper
> >
>Have fun, and drink a lot of beer if things get difficult :-)
>
>Dr John
>The Night Tripper
>
>
>
>Want to buy your Pack or Services from MandrakeSoft? 
>Go to http://www.mandrakestore.com
>

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to