Ryan Jacobs


Installing darkhttpd

darkhttpd is a great, lightweight web server by Emil Mikulic. However, many Linux distros don't offer a package for it. This guide will go through all of the steps of obtaining and installing this amazing program.

Debian/Ubuntu

# Download and install build tools, (if you don't already have them)
$ sudo apt-get update
$ sudo apt-get install build-essential
# Clone repository, generate debian package, and install!
$ git clone https://github.com/ryanmjacobs/darkhttpd
$ cd darkhttpd
$ make debian
$ sudo dpkg -i darkhttpd.deb

Invocation & Usage

To start the web server, go to the directory that contains all of you web files, (.html, .cs, .js, etc.) and run 'darkhttpd .'. Notice that's 'darkhttpd DOT', but with a real dot. In BASH, the dot represents your current directory. Navigate your browser to localhost:8080 to see what's being hosted.

[email protected] ~ $ darkhttpd .
darkhttpd/1.10, copyright (c) 2013-2017 Emil Mikulic.
listening on: http://0.0.0.0:8080/
^C^C^C
[email protected] ~ $

An Example

Here we'll clone example.org and serve it locally.

$ wget -mpk http://example.org
$ darkhttpd example.org --port 1234

Now point your browser to localhost:1234, and browse the expansive site of example.org.