From 38810e566bf4f4ffa13e6a39813ca181a51e49f6 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Fri, 11 Jul 2025 21:30:05 +0530 Subject: [PATCH] apache: Make all directory listings more mobile friendly Closes #2256. Based on a suggestion by Andrew Betts on the mailing list. https://alioth-lists.debian.net/pipermail/freedombox-discuss/2022-August/009553.html Sunil: - Consolidate changes from various apps into a centralized place in freedombox.conf applicable for all directory listings. Tests: - In Sharing, TiddlyWiki and FeatherWiki apps, directory listing when viewed with Firefox Developer Tools Mobile view set to a Galaxy S20+ looks reasonable. Without the patch the page is very zoomed out. Signed-off-by: Joseph Nuthalapati Signed-off-by: Sunil Mohan Adapa Reviewed-by: Sunil Mohan Adapa --- data/etc/apache2/conf-available/freedombox.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/data/etc/apache2/conf-available/freedombox.conf b/data/etc/apache2/conf-available/freedombox.conf index 63da718dd..33d57a2a2 100644 --- a/data/etc/apache2/conf-available/freedombox.conf +++ b/data/etc/apache2/conf-available/freedombox.conf @@ -154,3 +154,12 @@ ErrorLog "|/usr/bin/systemd-cat --identifier=apache-error" # records its own timestamp. ErrorLogFormat "[%-m:%l] [pid %P:tid %{g}T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" CustomLog "|/usr/bin/systemd-cat --identifier=apache-access" vhost_combined + +## When showing an index page for a directory listing, ensure that viewport's +## width is the same as the device's width. Directory index pages generated by +## mod_autoindex are reasonably suitable for mobile devices. However, without +## the directive, mobile devices will assume the page to be not-mobile friendly +## and use a larger view port than the device size. + + IndexHeadInsert "" +