how to host multiple sites on apachee

Harold Hallikainen harold at hallikainen.com
Tue May 31 20:45:25 UTC 2005


Here's a bit of my config file for named virtual hosts. I put all the
virtual hosts in a separate file (vhosts.conf) and then added an include
line in httpd.conf so I could deal with these separately.

Harold


### 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 *:80

# Defaults for virtual hosts
# Logs

#
# Virtual hosts
#

# Virtual host Default Virtual Host
<VirtualHost *:80>
        DocumentRoot "/home/harold/public_html"
        ServerAdmin harold at hallikainen.com
        ServerName "kauko.hallikainen.org:80"
        ServerAlias "www.hallikainen.org"
        DirectoryIndex index.php index.html index.htm index.shtml
        LogLevel debug
        HostNameLookups off
</VirtualHost>

# Virtual host www.cccds.org
<VirtualHost *:80>
        DocumentRoot "/home/harold/public_html/cccds"
        ServerAdmin harold at hallikainen.com
        ServerName "www.cccds.org:80"
        DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>




-- 
FCC Rules Updated Daily at http://www.hallikainen.com




More information about the Redhat-install-list mailing list