THTTPD FROM SOURCE

wget https://acme.com/software/thttpd/thttpd-2.29.tar.gz
sha256sum thttpd-2.29.tar.gz
# 99c09f47da326b1e7b5295c45549d2b65534dce27c44812cf7eef1441681a397  thttpd-2.29.tar.gz

tar xzf thttpd-2.29.tar.gz
cd thttpd-2.29/

vi libhttpd.c

eventually add index without extension

#define INDEX_NAMES "index", "index.html", "index.htm", "index.xhtml", "index.xht", "Default.htm", "index.cgi"

note index.cgi is already in the list

make text/html the default for serving files w/o extension

//char* default_type = "text/plain; charset=%s";
char* default_type = "text/html; charset=%s";

build

./configure
echo $MAKEFLAGS
make

install

grep ^www /etc/group
groupadd www

# slackware
ls -ld /usr/local/man/man1/
mkdir -p /usr/local/man/man1/

make install
cp -i contrib/redhat-rpm/thttpd.conf /etc/
ls -lF /etc/thttpd.conf
chmod 755 /etc/thttpd.conf

decide what user the daemon will use (nobody is the default user)

grep ^no /etc/group
grep ^no /etc/passwd

as an alternative

groupadd thttpd
useradd --system -s /sbin/nologin -k /dev/null -d /noexist -g thttpd -u 32766 thttpd
grep ^thttpd /etc/group
grep ^thttpd /etc/passwd

GUIDES | LECTURES | BENCHMARKS | SMTP HEALTH