Blob Blame History Raw
######################################################################
# 
#   webenv.conf -- This httpd configuration file customizes the
#   presentation of errors and directory listing screens produced by
#   httpd. The customization is based on The CentOS Project corporate
#   visual style.
#
# Copyright (C) 2013 The CentOS Artwork SIG
#
# This configuration is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This configuration file is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
######################################################################

Alias /webenv "/var/www/webenv"

######################################################################
# Error Screens' Customization
######################################################################

Alias /error/include/ "/var/www/webenv/errors/"

<IfModule mod_include.c>

    <Directory "/var/www/webenv/errors">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        Order allow,deny
        Allow from all
    </Directory>
    
    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
    ErrorDocument 410 /error/HTTP_GONE.html.var
    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

</IfModule>

######################################################################
# Directory Listing's Customization
######################################################################

# Control the appearance of server-generated directory listings.
IndexOptions FancyIndexing VersionSort SuppressHtmlPreamble IconsAreLinks 

# Tell the server which icon to show for different files or filename
# extensions.  These are only displayed for FancyIndexed directories.
AddIcon /webenv/images/icon-binary.png .bin .exe
AddIcon /webenv/images/icon-cd.png .iso
AddIcon /webenv/images/icon-layout.png .pdf .odt
AddIcon /webenv/images/icon-text.png .txt
AddIcon /webenv/images/icon-warning.png README
AddIcon /webenv/images/icon-html.png .htm .html .shtml
AddIcon /webenv/images/icon-inkscape.png .svg
AddIcon /webenv/images/icon-script.png .conf .sh .shar .csh .ksh .tcl .php .pl .cgi .py
AddIcon /webenv/images/icon-compressed.png .Z .z .tgz .gz .zip .tbz .bz2 .tar.gz .tar.bz2 .rpm .srpm .tar

AddIconByEncoding (CMP,/images/icon-compressed.png) x-compress x-gzip

AddIconByType (TXT,/webenv/images/icon-text.png) text/*
AddIconByType (IMG,/webenv/images/icon-image.png) image/*
AddIconByType (SND,/webenv/images/icon-sound.png) audio/*
AddIconByType (VID,/webenv/images/icon-movie.png) video/*

AddIcon /webenv/images/icon-back.png ..
AddIcon /webenv/images/icon-folder.png ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
DefaultIcon /webenv/images/icon-unknown.png

# Name of the file that will be inserted at the top of the index
# listing.  
<Directory "/home/*/public_html">
    HeaderName /webenv/indexes/top.html
    ReadmeName /webenv/indexes/bottom.html
</Directory>

# Allow Server Side Includes (SSI) for top and bottom files, so we can
# expand system variables like REQUEST_URI inside them.
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/webenv/indexes">
    AllowOverride None
    Options IncludesNoExec
    AddOutputFilter Includes html
    Order allow,deny
    Allow from all
    AddHandler type-map var
    LanguagePriority en es de fr
    ForceLanguagePriority Prefer Fallback
</Directory>
</IfModule>
</IfModule>

# Set short description after a file in server-generated indexes.
# These are only displayed for FancyIndexed directories.
# Format: AddDescription "description" filename
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

# Set filenames which directory indexing should ignore and not
# include in the listing.  Shell-style wildcarding is permitted.
IndexIgnore .??* *~ *# HEADER* README.html RCS CVS *,v *,t