[K12OSN] Apache
Jim Kronebusch
jim at winonacotter.org
Thu Nov 4 21:36:10 UTC 2004
> ### Section 3: Virtual Hosts
> #
> # VirtualHost: If you want to maintain multiple domains/hostnames on
your
> # machine you can setup VirtualHost containers for them. Most
configurations
> # use only name-based virtual hosts so the server doesn't need to
worry about
> # IP addresses. This is indicated by the asterisks in the directives
below.
> #
> # Please see the documentation at
> # <URL:http://httpd.apache.org/docs-2.0/vhosts/>
> # for further details before you try to setup virtual hosts.
> #
> # You may use the command line option '-S' to verify your virtual host
> # configuration.
>
> #
> # Use name-based virtual hosting.
> #
>
>
> # Where do we put the lock and pif files?
> LockFile "/var/lock/httpd.lock"
> CoreDumpDirectory "/etc/httpd"
>
> # Defaults for virtual hosts
>
> # Logs
>
> #
> # Virtual hosts
> #
>
> # Virtual host Default Virtual Host
> <VirtualHost *>
> ServerSignature email
> DirectoryIndex index.php index.html index.htm index.shtml
> LogLevel warn
> HostNameLookups off
> </VirtualHost>
>
> <Directory "/">
> Options FollowSymLinks
> AllowOverride None
> </Directory>
>
> <Directory "/var/www/html">
> Options Indexes Includes FollowSymLinks
> AllowOverride None
> Allow from all
> Order allow,deny
> </Directory>
>
> <Directory "/var/www/icons">
> Options Indexes MultiViews
> AllowOverride None
> Allow from all
> Order allow,deny
> </Directory>
>
> <Directory "/var/www/cgi-bin">
> Options ExecCGI
> AllowOverride None
> Allow from all
> Order allow,deny
> </Directory>
Just a few suggestions for changes here. Since you are doing name based
hosting you need the NameVirtualHost * directive, also you should have a
ServerName directive in each Virtual host, and your Directory directives
specific to the virtual host should be contained in the virtual host
containers. I'll paste the changes below:
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on
your
# machine you can setup VirtualHost containers for them. Most
configurations
# use only name-based virtual hosts so the server doesn't need to worry
about
# IP addresses. This is indicated by the asterisks in the directives
below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *
# Where do we put the lock and pif files?
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"
# Defaults for virtual hosts
# Logs
#
# Virtual hosts
#
# Virtual host Default Virtual Host
<VirtualHost *>
ServerName madisonhs.yourdomain.com
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
<Directory "/">
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/html">
Options Indexes Includes FollowSymLinks
AllowOverride None
Allow from all
Order allow,deny
</Directory>
<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Allow from all
Order allow,deny
</Directory>
<Directory "/var/www/cgi-bin">
Options ExecCGI
AllowOverride None
Allow from all
Order allow,deny
</Directory>
</VirtualHost>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004
--
This message has been scanned for viruses and
dangerous content by the Cotter Technology
Department, and is believed to be clean.
More information about the K12OSN
mailing list