You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Chris Pepper <pe...@mail.reppep.com> on 2001/12/03 00:23:18 UTC
Re: Virtual hosts and bind
At 9:23 PM -0500 2001/11/28, Rich Bowen wrote:
>I have been enduring an extended tirade from a disgruntled user
>regarding the vhosts documentation. I suppose I could share most of his
>notes with the mailing list, but I'm not sure how much good this would
>do. His primary points are as follows:
>
>1) There's no step-by-step guide for setting up a virtual host. (I don't
>think that I agree with this, but I admit that I have a somewhat
>different perspective, having done this a few times.)
Screwy users aside, I think
<http://httpd.apache.org/docs/vhosts/name-based.html> is pretty good,
and could be enhanced by a good general sample, showing the most
likely directives for use in a vhost block, and warnings:
You must update your DNS so this hostname maps to this IP.
Beware DNS CNAMEs for mailhosts -- It's logical to use CNAMEs
with vhosts, but if you introduce sendmail, it will rewrite, and this
is probably not what you want; with sendmail, use multiple A records.
Define a vhost for the default case; define the main
(non-vhost) area of httpd.conf to be extra-conservative, and override
as necessary for specific vhosts.
If you specify vhost access or error logging, but not both,
the other logging doesn't happen -- Is this true? I think I saw it
mentioned here, but never complained.
NameVirtualHost is requires before VirtualHost direct
Here's a pretty standard vhost block -- I use a bunch just
like this with different names and paths. What else should be
included in a good general example?
<VirtualHost 64.81.19.108>
DocumentRoot /home/web/mosxsw/htdocs/
ServerName www.mosxsw.com
ServerAlias mosxsw.com www.macosxsw.com macosxsw.com port.mosxsw.com
ErrorLog logs/error_log
CustomLog logs/mosxsw.com-access_log combined
</VirtualHost>
Thanks,
Chris Pepper
--
Chris Pepper: <http://www.reppep.com/~pepper/>
Rockefeller University: <http://www.rockefeller.edu/>
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Virtual hosts and bind
Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Andy Doran - Fasthosts Internet Ltd." <an...@fasthosts.co.uk>
Sent: Monday, December 03, 2001 3:20 AM
> > Here's a pretty standard vhost block -- I use a bunch just
> > like this with different names and paths. What else should be
> > included in a good general example?
> >
> > <VirtualHost 64.81.19.108>
> > DocumentRoot /home/web/mosxsw/htdocs/
> > ServerName www.mosxsw.com
> > ServerAlias mosxsw.com www.macosxsw.com macosxsw.com
> > port.mosxsw.com
> > ErrorLog logs/error_log
> > CustomLog logs/mosxsw.com-access_log combined
> > </VirtualHost>
>
>
> I would suggest that ServerAdmin should be in there too, unless you set it
> up globally.
For an example block? I'd agree ServerAdmin should be there. Is there any
difference between;
ServerAlias mosxsw.com www.macosxsw.com macosxsw.com port.mosxsw.com
and
ServerAlias mosxsw.com
ServerAlias www.macosxsw.com
ServerAlias macosxsw.com
ServerAlias port.mosxsw.com
??? If not, the latter is certainly more legible.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
RE: Virtual hosts and bind
Posted by "Andy Doran - Fasthosts Internet Ltd." <an...@fasthosts.co.uk>.
> Here's a pretty standard vhost block -- I use a bunch just
> like this with different names and paths. What else should be
> included in a good general example?
>
> <VirtualHost 64.81.19.108>
> DocumentRoot /home/web/mosxsw/htdocs/
> ServerName www.mosxsw.com
> ServerAlias mosxsw.com www.macosxsw.com macosxsw.com
> port.mosxsw.com
> ErrorLog logs/error_log
> CustomLog logs/mosxsw.com-access_log combined
> </VirtualHost>
I would suggest that ServerAdmin should be in there too, unless you set it
up globally.
Andy.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org