Busybox httpd with basic auth


For very simple websites, nothing beats running ‘busybox httpd’.

To build it, download the latest source from the download page of busybox.net.

To compile:

make defconfig
make

To run with basic authentication:

$ busybox httpd -m secret
$1$gDqyrCR.$6MSG2JC9CBWRNypWVfuC81
echo '/:fred:$1$gDqyrCR.$6MSG2JC9CBWRNypWVfuC81' > httpd.conf
busybox httpd -v -f -p 5005 -r "Identify yourself:" -c httpd.conf

Options used:

-v: be verbose
-f: stay in foreground (don't daemonize)
-p: port number
-r: authentication realm (i.e. string you want to show the users)
-c: configuration file