Apache HTTP Server /etc/httpd/conf.d/autoindex.conf

Original 📋 Red Hat Enterprise Linux 9 (Plow) 93 Zeilen

Läuft auf

Ansicht:
Red Hat Enterprise Linux 9 (Plow)
Gleich auf:
CentOS Stream 9
Andere Versionen:

Details

Größe
93 Zeilen
MD5
c386a91bce410b691604b4b43edc8d7e
SHA256
a58117d710fa03b0af998029ac62a443079973c89fa3401584eb538ce29aac1a
/etc/httpd/conf.d/autoindex.conf
#
# Directives controlling the display of server-generated directory listings.
#
# Required modules: mod_authz_core, mod_authz_host,
#                   mod_autoindex, mod_alias
#
# To see the listing of a directory, the Options directive for the
# directory must include "Indexes", and the directory must not contain
# a file matching those listed in the DirectoryIndex directive.
#

#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing HTMLTable VersionSort

# We include the /icons/ alias for FancyIndexed directory listings.  If
# you do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/usr/share/httpd/icons/"

<Directory "/usr/share/httpd/icons">
    Options Indexes MultiViews FollowSymlinks
    AllowOverride None
    Require all granted
</Directory>

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions.  These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIconByType /icons/bomb.gif application/x-coredump

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a 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

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes. 
ReadmeName README.html
HeaderName HEADER.html

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

Kopieren & Einfügen

curl:
curl https://exampleconfig.com/api/v1/config/original/c386a91bce410b691604b4b43edc8d7e?hint=autoindex.conf
wget:
wget -O autoindex.conf https://exampleconfig.com/api/v1/config/original/c386a91bce410b691604b4b43edc8d7e?hint=autoindex.conf

Für KI-Agenten

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/c386a91bce410b691604b4b43edc8d7e?hint=autoindex.conf' /><config><app>Apache HTTP Server</app><os>Red Hat Enterprise Linux 9 (Plow)</os><location>/etc/httpd/conf.d/autoindex.conf</location><lines>93</lines><md5>c386a91bce410b691604b4b43edc8d7e</md5><sha256>a58117d710fa03b0af998029ac62a443079973c89fa3401584eb538ce29aac1a</sha256></config></prompt>

Füge es in Claude, ChatGPT oder einen anderen KI-Assistenten ein.

Apache HTTP Server installieren

Alpine Linux

sudo apk add apache2

Debian

sudo apt update && sudo apt install apache2

Red Hat Enterprise Linux

sudo yum install httpd

Ubuntu

sudo apt update && sudo apt install apache2

Ablageort

Pfad
/etc/httpd/conf.d/autoindex.conf
Verzeichnis
/etc/httpd/conf.d/
Bedeutung
Systemweites Konfig-Verzeichnis
Beschreibung
In /etc/ liegen systemweite Einstellungen, die alle Benutzer betreffen.

FAQ

Wann sollte ich autoindex.conf verwenden?

Nutze sie, um eine fehlende Default-Datei wiederherzustellen, zu prüfen, was ausgeliefert wurde, oder sie gegen deine aktuelle Apache HTTP Server-Config zu diffen.

Wie stelle ich die Defaults von Apache HTTP Server wieder her?

Lad die Datei runter, sichere die aktuelle in /etc/httpd/conf.d/autoindex.conf, ersetze sie und lade Apache HTTP Server neu oder starte es neu.

Ist autoindex.conf für den produktiven Einsatz geeignet?

Das ist der Hersteller-Default für Red Hat Enterprise Linux 9 (Plow). Nimm sie als Basis und prüf Security- und Performance-Einstellungen, bevor du sie produktiv nutzt.

Wie unterscheidet sich das von anderen OS-Versionen?

Defaults variieren je nach Distro und Version. Diese Version passt zu Red Hat Enterprise Linux 9 (Plow).

Kann ich das fürs Troubleshooting von Apache HTTP Server nutzen?

Ja. Diff es gegen deine Version, finde Abweichungen und stell nur die Teile wieder her, die du brauchst.