资 源 简 介
Introduction
OneHTTPD is a minimalist web server that is written in one self-contained source file. The primary motivation of the project is to write a small, portable executable to serve static files on a Windows desktop. It currently supports a (small) subset of HTTP/1.0.
Supported Platforms
It is tested on Linux (Debian) and Windows (XP). It should work on most Linux systems and Windows 2k+. It might work on some other Unices.
Building OneHTTPD
Note that the preferred build environment for Windows executables is the MinGW (cross) compiler under Linux.
The code compiles under gcc and MinGW.
The source file, onehttpd.c, is actually a polyglot. It also serves as the Makefile, and the resource file. Therefore, to make, do the following:
$ ln -s onehttpd.c Makefile$ ln -s onehttpd.c onehttpd.rc$ make
If you wish to build OneHTTPD on Windows, take look at the Makefile part