Skip to content

HTTP Server supporting a tiny bit of HTTP 1.0/1.1 Protocol

Notifications You must be signed in to change notification settings

t2nerb/HTTP-Server-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP Server in C

By: Brent Dagdagan

About

Web server utilizing HTTP and TCP protocols. The code works by creating a socket that binds to the port specified in the configuration file, and listens for incoming client connections. When a connection is established (Client sends an HTTP request), a child-process is created to handle the request.

The server supports GET requests and HTTP status codes: 200, 400, 404, 501

Setup

A makefile is provided to compile the code. Execute all the following commands in the project's root directory:

To compile:

$ make

To run the server:

$ ./http-server 

To cleanup:

$ make clean

Configuration

By default, the application is set to serve files in ./www/. All configurable parameters are in ./ws.conf.

From here you can edit configurations for:

  • Root web directory
  • Change listening port
  • Add new filetypes

About

HTTP Server supporting a tiny bit of HTTP 1.0/1.1 Protocol

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published