# If you're trying to be friendly to mswin-using webmasters, this might
# help. On the other hand, you may prefer not to coddle case-sensitivity
# problems.
DirectoryIndex index.html index.htm INDEX.HTM

# a cgi directory for all the websites to share code the machine's
# sysadmin has approved... for use by the site's webmasters only
ScriptAlias /cgi-private/ /usr/local/cgi-private/

<Directory /usr/local/cgi-private/>
    AllowOverride None
    Options ExecCGI
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0
    # and perhaps a few IP addresses of the webmasters' home systems.
</Directory>

# local policy can be that anything intended to be used by everyone
# in the world with a browser, should be kept in /home/websites, which
# we keep active backups for.

# a global script directory, also vetted by the machine sysadmin
ScriptAlias /cgi-bin/ /home/websites/cgi-bin/

<Directory /home/websites/cgi-bin/>
    AllowOverride None
    Options ExecCGI
    Order deny,allow
    Allow from all
</Directory>

NameVirtualHost aaa.bbb.ccc.ddd

<VirtualHost www.my-original.example.com>
    ServerName www.my-original.example.com
    ServerAlias www.my.example.com my.example.com
    ServerAdmin my.webmaster@example.com
    DocumentRoot /home/websites/virthost1/htdocs
    ScriptAlias /cgi/ /home/websites/virthost1/cgi/
    Alias /icons/ /home/websites/virthost1/icons/
    ErrorLog /var/log/apache/1/error_log
    CustomLog /var/log/apache/1/access_log_site1 common
    ErrorDocument 500 /errors/500.html
    ErrorDocument 404 /errors/404.html
 </VirtualHost>

<VirtualHost www.newsite.example.org>
    ServerName www.newsite.example.org
    ServerAlias newsite.example.org
    ServerAdmin weblords@example.org
    DocumentRoot /home/websites/virthost2/htdocs
    ScriptAlias /cgi/ /home/websites/virthost2/cgi/
    Alias /icons/ /home/websites/virthost2/icons/
    ErrorLog /var/log/apache/2/error_log
    CustomLog /var/log/apache/2/access_log common
    ErrorDocument 500 /errors/500.html
    ErrorDocument 404 /errors/404.html
 </VirtualHost>

# keep people from snooping the website space for
# undeclared directories
<Directory /home/websites>
    Options None
    AllowOverride None
</Directory>


# this should cover all the little clone websites
<Directory /home/websites/*/htdocs>
    AllowOverride FileInfo AuthConfig Limit
    Options Includes Indexes SymlinksIfOwnerMatch
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

# this covers their icons
<Directory /home/websites/*/icons>
    Options MultiViews
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

# this covers their dedicated script directories;  the sysadmin here
# really has to trust these site admins, or they'll have to ask very
# nicely to have their extra scripts installed.
<Directory /home/websites/virthost*/cgi>
    AllowOverride None
    Options ExecCGI
    Order deny,allow
    Allow from all
</Directory>

