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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to