############################################################################
## $Id: apache.conf.in.dist,v 1.8 2003/08/09 18:01:39 ehood Exp $
## Description:
##	The following are template/example Apache configuration
##	directives that apply to the mail archives.
##
##	IMPORTANT: MAKE SURE TO REVIEW THE DIRECTIVES HERE IF
##		   USE THIS FILE AGAINST ANY SECURITY CONCERNS
##		   YOU MAY HAVE.
############################################################################

<IfModule mod_alias.c>
    # Uncomment and change the following if ROOT_URL in config.sh 
    # is not already directly accessible from a web client.
    #Alias @@ROOT_URL@@ "@@SW_ROOT@@"

    # Enable mharc CGI programs.  Alternate enabling method is
    # defined below.
    ScriptAlias @@CGI_URL@@/ "@@CGI_DIR@@/"
</IfModule>

<Directory @@SW_ROOT@@>
    AllowOverride All

    Options MultiViews Indexes FollowSymLinks
    IndexOptions FancyIndexing NameWidth=* SuppressSize SuppressLastModified

    # Make sure namazu index files are not visible in directory listings
    IndexIgnore NMZ.*

    # Deny access to files that we probably do not want the public to
    # see.  The main one is .mhonarc.db files, especially if we have
    # mail address obfsucation in the HTML archives.
    <Files ~ "^(NMZ|\.proc|procmail|msgid.cache|.mhonarc.db|config\.sh|lists\.def)">
	Order allow,deny
	Deny from all
    </Files>

    # Deny access to log files
    <Files ~ "\.log$">
	Order allow,deny
	Deny from all
    </Files>

    # Deny access to temporary incoming mail file used by filter-spool
    <Files ~ ".newmail$">
	Order allow,deny
	Deny from all
    </Files>

    # Limit the types of HTTP methods allowed
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
        Order deny,allow
        Deny from all
    </Limit>
</Directory>

# Enable CGI execution for cgi-bin directory.  This is probably not
# necessary if the above ScriptAlias directive is used.
<Directory @@SW_ROOT@@/cgi-bin>
    Options +ExecCGI
    <IfModule mod_mime.c>
	AddHandler cgi-script .cgi
    </IfModule>
</Directory>

# Browsing access to raw mail archives.
<Directory @@MBOX_DIR@@/*/>
    AllowOverride All
    Options Indexes FollowSymLinks
    IndexOptions FancyIndexing SuppressDescription
</Directory>

