Wednesday, September 22, 2010

Web Server

This was one of the cooler assignments I've had as a student: create your own webserver.

I've installed apache via Linux but I wasn't aware that it was so simple to make a basic webserver.

Webserver Details:
  • Language: POSIX C
  • Command Line Parameter: port number
  • HTTP 1.1
  • Method Supported: GET
  • Counts and displays accesses
  • Displays current server time
  • Hard-coded domain and file path names
Download webserver source code: here

I've included a few comments that are purely for learning purposes only. Thanks to Beej for outlining the socket library in such great detail.

No comments:

Post a Comment