|
| 1 | +# |
| 2 | +# Directives controlling the display of server-generated directory listings. |
| 3 | +# |
| 4 | +# Required modules: mod_authz_core, mod_authz_host, |
| 5 | +# mod_autoindex, mod_alias |
| 6 | +# |
| 7 | +# To see the listing of a directory, the Options directive for the |
| 8 | +# directory must include "Indexes", and the directory must not contain |
| 9 | +# a file matching those listed in the DirectoryIndex directive. |
| 10 | +# |
| 11 | + |
| 12 | +# IndexOptions: Controls the appearance of server-generated directory |
| 13 | +# listings. |
| 14 | +# |
| 15 | +# Charset=utf-8 handles rendering of filenames with Asian-language |
| 16 | +# characters; see: https://git.lib.berkeley.edu/ops/ansible/issues/304 |
| 17 | +IndexOptions Charset=utf-8 FancyIndexing HTMLTable IconsAreLinks IgnoreCase NameWidth=* VersionSort |
| 18 | + |
| 19 | +# We include the /icons/ alias for FancyIndexed directory listings. If |
| 20 | +# you do not use FancyIndexing, you may comment this out. |
| 21 | +Alias /icons/ "/usr/share/httpd/icons/" |
| 22 | +Alias /autoindex/ "/var/www/autoindex/" |
| 23 | + |
| 24 | +<Directory "/usr/share/httpd/icons"> |
| 25 | + Options Indexes MultiViews FollowSymlinks |
| 26 | + AllowOverride None |
| 27 | + Require all granted |
| 28 | +</Directory> |
| 29 | + |
| 30 | +# NOTE(dcschmidt): Custom styles/partials/images |
| 31 | +# @see https://git.lib.berkeley.edu/lap/digital-preservation-assets/issues/1 |
| 32 | +Alias /favicon.ico "/var/www/autoindex/images/favicon.ico" |
| 33 | +<Directory /var/www/html> |
| 34 | + Options Indexes MultiViews FollowSymlinks |
| 35 | + AllowOverride None |
| 36 | + Require all granted |
| 37 | +</Directory> |
| 38 | + |
| 39 | +# |
| 40 | +# AddIcon* directives tell the server which icon to show for different |
| 41 | +# files or filename extensions. These are only displayed for |
| 42 | +# FancyIndexed directories. |
| 43 | +# |
| 44 | +AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip |
| 45 | + |
| 46 | +AddIconByType (TXT,/icons/text.gif) text/* |
| 47 | +AddIconByType (IMG,/icons/image2.gif) image/* |
| 48 | +AddIconByType (SND,/icons/sound2.gif) audio/* |
| 49 | +AddIconByType (VID,/icons/movie.gif) video/* |
| 50 | + |
| 51 | +AddIcon /icons/binary.gif .bin .exe |
| 52 | +AddIcon /icons/binhex.gif .hqx |
| 53 | +AddIcon /icons/tar.gif .tar |
| 54 | +AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv |
| 55 | +AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip |
| 56 | +AddIcon /icons/a.gif .ps .ai .eps |
| 57 | +AddIcon /icons/layout.gif .html .shtml .htm .pdf |
| 58 | +AddIcon /icons/text.gif .txt |
| 59 | +AddIcon /icons/c.gif .c |
| 60 | +AddIcon /icons/p.gif .pl .py |
| 61 | +AddIcon /icons/f.gif .for |
| 62 | +AddIcon /icons/dvi.gif .dvi |
| 63 | +AddIcon /icons/uuencoded.gif .uu |
| 64 | +AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl |
| 65 | +AddIcon /icons/tex.gif .tex |
| 66 | +AddIcon /icons/bomb.gif /core |
| 67 | +AddIcon /icons/bomb.gif */core.* |
| 68 | + |
| 69 | +AddIcon /icons/back.gif .. |
| 70 | +AddIcon /icons/hand.right.gif README |
| 71 | +AddIcon /icons/folder.gif ^^DIRECTORY^^ |
| 72 | +AddIcon /icons/blank.gif ^^BLANKICON^^ |
| 73 | + |
| 74 | +# |
| 75 | +# DefaultIcon is which icon to show for files which do not have an icon |
| 76 | +# explicitly set. |
| 77 | +# |
| 78 | +DefaultIcon /icons/unknown.gif |
| 79 | + |
| 80 | +# |
| 81 | +# AddDescription allows you to place a short description after a file in |
| 82 | +# server-generated indexes. These are only displayed for FancyIndexed |
| 83 | +# directories. |
| 84 | +# Format: AddDescription "description" filename |
| 85 | +# |
| 86 | +#AddDescription "GZIP compressed document" .gz |
| 87 | +#AddDescription "tar archive" .tar |
| 88 | +#AddDescription "GZIP compressed tar archive" .tgz |
| 89 | + |
| 90 | +# |
| 91 | +# ReadmeName is the name of the README file the server will look for by |
| 92 | +# default, and append to directory listings. |
| 93 | +# |
| 94 | +# HeaderName is the name of a file which should be prepended to |
| 95 | +# directory indexes. |
| 96 | +ReadmeName README.html |
| 97 | +HeaderName HEADER.html |
| 98 | + |
| 99 | +# |
| 100 | +# IndexIgnore is a set of filenames which directory indexing should ignore |
| 101 | +# and not include in the listing. Shell-style wildcarding is permitted. |
| 102 | +# |
| 103 | +# NOTE(dcschmidt): _SYNCAPP directories are created by the Allway Sync program. |
| 104 | +# Lynne uses this to copy files from workstations to the NetApp/NFS server. |
| 105 | +# |
| 106 | +IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t _SYNCAPP* |
| 107 | + |
| 108 | +# NOTE(dcschmidt): Implements custom styles. This depends on settings in |
| 109 | +# autoindex.conf that alias and allow the .html/ directory. |
| 110 | +# |
| 111 | +# @see http://digitalassets.lib.berkeley.edu/UCBonly/ldc/2004T04/ Test Case |
| 112 | +# @see https://git.lib.berkeley.edu/lap/digital-preservation-assets/issues/1 |
| 113 | +IndexHeadInsert "<meta name=\"viewport\" content=\"width=device-width\">" |
| 114 | +IndexHeadInsert "<link rel=\"stylesheet\" href=\"https://use.typekit.net/rxa5jay.css\">" |
| 115 | +IndexStyleSheet /autoindex/css/style.css |
| 116 | +ReadmeName /autoindex/partials/footer.html |
| 117 | +HeaderName /autoindex/partials/header.html |
0 commit comments