Notes:
When "options indexes" is defined for a directory, then a file listing will be presented whenever file "index.html" is not found. This is fairly old technology which was implemented before responsive web so you might need to jump through a few hoops to make it look pretty (and add a viewport)
<Directory "/var/www">
# === conservative ===
# Options Indexes
# === liberal === Options All Multiviews
# =================== AllowOverride None Order allow,deny Allow from all
# ===================
# Not Mobile Friendly # IndexOptions FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=*
# =================== # Mobile Friendly: IndexOptions FancyIndexing
IndexOptions HTMLTable
IndexOptions FoldersFirst
IndexOptions NameWidth=* IndexOptions IgnoreCase IndexOptions SuppressDescription
# Additional changes to reduce width IndexOptions SuppressSize Indexoptions SuppressLastModified Indexoptions SuppressColumnSorting IndexOptions SuppressIcon
# need this meta statement in the HTTP header IndexHeadInsert '<meta name="viewport" content="width=device-width, initial-scale=1" />'
IndexStyleSheet "/css/nsr-folder-default.css"
# (optional) ditch the parent link
# IndexIgnore ".."
# =================== </Directory>
* {word-wrap:break-word;} body {font-family:sans-serif;background-color:#fff;margin:0;padding:0;} pre {font-family:monospace} a {text-decoration:none;color:blue} a:link {text-decoration:none;color:blue} a:visited {text-decoration:none;color:blue} a:hover {text-decoration:none;color:blue;cursor:pointer} a:active {text-decoration:none;color:blue} a.nsr {text-decoration:none;color:blue;display:inline-block} a.nsr:link {text-decoration:none;color:blue;display:inline-block} a.nsr:visited {text-decoration:none;color:blue;display:inline-block} a.nsr:hover {text-decoration:none;color:blue;display:inline-block;cursor:pointer} a.nsr:active {text-decoration:none;color:blue;display:inline-block} table {border:1px solid gray;border-collapse:collapse;padding:4px} table tr th {border:1px solid gray;padding:4px} table tr td {border:1px solid gray;padding:4px} h1 {color:red;font-size:100%} pre {padding:4px; margin:0; border:1px solid black; font-weight:bold; overflow-x:auto; line-height:24px; font-size:100%; max-width:99vw} /* ** for a responsive page */ @media screen and (min-width:400px) { * {font-size:10pt;} } @media screen and (min-width:768px) { * {font-size:12pt;} } @media screen and (min-width:1000px) { * {font-size:14pt;} }