How To Install darkhttpd on Fedora 36

In this tutorial we learn how to install darkhttpd in Fedora 36. darkhttpd is Secure, lightweight, fast, single-threaded HTTP/1.1 server

Introduction

In this tutorial we learn how to install darkhttpd on Fedora 36.

What is darkhttpd

darkhttpd is a secure, lightweight, fast and single-threaded HTTP/1.1 server. Features * Simple to set up * Single binary, no other files. * Standalone, doesn’t need inetd or ucspi-tcp. * No messing around with config files. * Written in C - efficient and portable. * Small memory footprint. * Event loop, single threaded - no fork() or pthreads. * Generates directory listings. * Supports HTTP GET and HEAD requests. * Supports Range / partial content. * Supports If-Modified-Since. * Supports Keep-Alive connections. * Can serve 301 redirects based on Host header. * Uses sendfile(). Security * Can log accesses, including Referer and User-Agent. * Can chroot. * Can drop privileges. * Impervious to /../ sniffing. * Times out idle connections. * Drops overly long requests. Limitations * This server only serves static content - NO CGI supported!

We can use yum or dnf to install darkhttpd on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install darkhttpd.

Install darkhttpd on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install darkhttpd using dnf by running the following command:

sudo dnf -y install darkhttpd

Install darkhttpd on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install darkhttpd using yum by running the following command:

sudo yum -y install darkhttpd

How To Uninstall darkhttpd on Fedora 36

To uninstall only the darkhttpd package we can use the following command:

sudo dnf remove darkhttpd

darkhttpd Package Contents on Fedora 36

/etc/sysconfig/darkhttpd
/usr/lib/.build-id
/usr/lib/.build-id/d7
/usr/lib/.build-id/d7/237a08ffe824ad5e21f1473d0feded447a4940
/usr/lib/systemd/system/darkhttpd.service
/usr/sbin/darkhttpd
/usr/share/doc/darkhttpd
/usr/share/doc/darkhttpd/README.md

References

Summary

In this tutorial we learn how to install darkhttpd on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).