Zepto Web Server is a tiny open source HTTP web server well-written in C that can handle simple HTTP requests and serve information in HTML format by using dynamic modules that can be loaded at runtime. Also, the HTTP web server runs as a daemon process and is designed according to the MPM (Multi-Processing Module) architecture that allows multiple requests to be processed almost simultaneously. The main server daemon process creates and maintains various server workers which handle incoming requests.

Some of the characteristics of Zepto Web Server:

  • It is well-written and is based on POSIX (Portable Operating System Interface)
  • It is capable of supporting both IPv4 and IPv6 addresses (IP-Agnostic)
  • It has a well-written design to support a variety of HTTP requests / responses
  • It supports multilingualism and currently only English and Greek translations can be found
  • It takes advantage of the MPM (Multi-Processing Module) architecture
  • It provides useful command line options for setting the web server parameters
  • It has the ability to use different content types defined by MIME standards
  • Both the preforking server and the server workers run as daemons processes  in the background
  • It uses non-blocking I/O
  • It supports both HTTP/1.0 and HTTP/1.1
  • It has no memory leaks
  • Both the preforking server and the server workers use system logging
  • It supports a signal dispatcher for the preforking server and the server workers
  • It supports loadable modules for getting HTML content through simple HTTP GET requests

Zepto Web Server supports locales for internationalization and also has a man page documentation.

Here is a simple example of how you can start and stop as root user the web server:

Starting the web server with the following options:

Server Address = 192.168.10.2
Server Port = 5555
Server Workers = 40
Worker Requests = 1000
Server Modules Path = “/home/zws/modules”

Usage:

zws -a 192.168.10.2 -p 5555 -w 40 -r 1000 -m "/home/zws/modules"

Stopping the web server:

kill -SIGTERM `cat /var/run/zws.pid`

To use the web server and run for example the “module-a” just open your web browser and call:

http://192.168.10.2:5555/module-a

Happy Hacking!