TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:14537] Apache Virtual hosting problems
On Fri, Mar 10, 2000 at 09:40:13AM -0600, Nate Carlson wrote:
> Here's what that should look like:
>
> NameVirtualHost 63.226.156.122
>
> <VirtualHost 63.226.156.122>
> DocumentRoot /usr/home/mnvalley/www/
> ServerName www.mnvalley.net
> ErrorLog logs/mnvalley_err_log
> </VirtualHost>
>
> <VirtualHost 63.226.156.122>
> DocumentRoot /usr/home/customized/www
> ServerName www.customizedincentives.com
> ErrorLog logs/customized_err_log
> </VirtualHost>
I actually like to use the "Include" statement to reference a file specific to
the virtual host itself. That way, I can combine the httpd, srm, and access
portions of the configuration for a virtual host all in the same file. Thus,
my configuration would look like the following:
#--- Begin httpd.conf section
# Name Virtual Hosts
NameVirtualHost 63.226.156.122
Include site/mnvalley.net
Include site/customizedincentives.com
#--- End httpd.conf section
#--- Begin ./site/mnvalley.net
# Site: mnvalley.net
# Aliases: www.mnvalley.net
# Contact: Joe "Contact" Smith <jcsmith@mnvalley.net>
# Phone/Pager:
# Notes: They may want something specific with this site
#
# Change Log
#
# 2000/03/10 CCW Created the site directories and conf files
# htdocs Directory Access Permissions
<Directory "/home/httpd/mnvalley.net/htdocs">
AllowOverride None
Options Indexes Includes
Order allow,deny
Allow from all
</Directory>
# CGI Directory Access Permissions
<Directory "/home/httpd/mnvalley.net/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
# Virtual Host Entry
<VirtualHost 63.226.156.122>
ServerName mnvalley.net
ServerAlias www.mnvalley.net
DocumentRoot /home/httpd/mnvalley.net/htdocs
ScriptAlias /cgi-bin/ "/home/httpd/mnvalley.net/cgi-bin/"
ErrorLog /home/httpd/mnvalley.net/log/error.log
CustomLog /home/httpd/mnvalley.net/log/access_log common
</VirtualHost>
#-- End sites/mnvalley.net
--
^chewie
PGP signature