############################################################################
## $Id: apache.conf.in.dist,v 1.7 2002/09/29 04:22:14 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>
    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
<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>

