Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1057842: mini-httpd: Update of mini-httpd breaks default web page if it is not index.html

17 views
Skip to first unread message

Alexander Foken

unread,
Dec 9, 2023, 9:00:05 AM12/9/23
to
Package: mini-httpd
Version: 1.30-3
Severity: important

Dear Maintainer,

after installation of mini-httpd, I removed
/var/www/html/index.mini-httpd.html
and installed my own /var/www/html/index.cgi to deliver the default web
page.

Updating mini-httpd re-creates /var/www/html/index.mini-httpd.html every
time
and leaves a useless "It works!" message as the default web page.

Manually removing /var/www/html/index.mini-httpd.html after each update
restores the web page.

The reason for this is that the patch
https://sources.debian.org/patches/mini-httpd/1.30-3/0003-fix-change-index-document-root/
sets index.mini-httpd.html as the second possible default page, not the
last one
in const char * index_names[]. This not only disables index.cgi, also
disables index.htm, index.xhtml, index.xht, Default.htm, and index.php
added by
https://sources.debian.org/patches/mini-httpd/1.30-3/0005-cgi-php/

The real problem is that
https://salsa.debian.org/debian/mini-httpd/-/blob/master/debian/mini-httpd.postinst
creates the file /var/www/html/index.mini-httpd.html at all, and that
https://sources.debian.org/patches/mini-httpd/1.30-3/0003-fix-change-index-document-root/
modifies the binary to deliver this file.

A more sane way would be to follow the example of Apache, delivering a
default
/var/www/html/index.html when the package is installed, update it only
if it is
unmodified, and do not recreate it when the package is updated. That
way, the entire patch
https://sources.debian.org/patches/mini-httpd/1.30-3/0003-fix-change-index-document-root/
can be omitted and mini-httpd works as intended.



-- System Information:
Debian Release: 12.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.11-6-pve (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mini-httpd depends on:
ii init-system-helpers 1.65.2
ii libc6 2.36-9+deb12u3
ii libcrypt1 1:4.4.33-2
ii libssl3 3.0.11-1~deb12u2
ii lsb-base 11.6
ii sysvinit-utils [lsb-base] 3.06-4

Versions of packages mini-httpd recommends:
ii apache2-utils 2.4.57-2

mini-httpd suggests no packages.

-- Configuration Files:
/etc/default/mini-httpd changed:
START=1
DAEMON_OPTS="-C /etc/mini-httpd.conf"

/etc/mini-httpd.conf changed:
port=80
user=www-data
nochroot # no
data_dir=/var/www/html
cgipat=**.cgi
logfile=/var/log/mini_httpd.log
pidfile=/var/run/mini_httpd.pid
charset=iso-8859-1


-- no debconf information
0 new messages