Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A simple C-based HTTP daemon (so I can practice C).
C VimL Shell
Tree: 9385152138

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
public
.gitignore
.vimrc
Makefile
README.md
configure
dbg.h
main.c
mhttpd.c
mhttpd.h

README.md

mhttpd

A minimal, C-based HTTP server.

My goal is to keep it simple and only handle GET requests. I'm building it to practice C and teach myself more about low level networking.

Usage

Usage: ./mhttpd [--help] [port]

Serve a directory over HTTP

   --help      Show this help text.
   port        Port number.  Default: 80 (requires privileges)

Example:

   ./mhttpd 3000

Right now, it just serves up "public/index.html" in response to any request.

Building

After you have the source (e.g., from downloading a tarball via GitHub), just do the standard steps:

./configure
make

Currently, there is no "make install" task, but you can mv the resulting "mhttpd" executable anywhere you'd like.

Something went wrong with that request. Please try again.