Simple Web Server

Implementation of a simple HTTP Server using programming language C.
The server can serve simple static file and show file list if the request is a directory.
It can also print HTTP request and response message in the terminal.
Check out this article explaining how it implemented.
https://medium.com/@feveraly/%E7%94%A8c%E5%AF%A6%E4%BD%9C%E4%B8%80%E5%80%8B%E7%B0%A1%E5%96%AE%E7%9A%84http-server-35dc27bc1a80

Build

Successfully built on Ubuntu 16.04 and Arch Linux.
Did not test on other linux platform but normally it should work.

  • make

Run

  • simply run with default port(8080) and default file path(./)
    ./webserver
  • identify port number and directory path
    ./webserver 8787 ./path/to/file/folder