MK
HomeProjectsArticles
Contact Me

© 2025 MK. All rights reserved.

HomeProjectsArticles

Minimalistic Web Server in C

This project is a simple web server written entirely in C, designed to serve static files such as HTML, JavaScript, CSS, and image files (PNG, JPG, ICO).

Project Goal

To build a lightweight and efficient web server in C capable of serving static files and handling concurrent client requests, showcasing low-level system programming and networking skills.

Technical Requirements

The project uses standard C libraries for networking (<sys/socket.h> and <netinet/in.h>), file I/O operations, and process management. The fork system call is employed to create child processes to handle multiple client requests simultaneously. The server parses HTTP requests to serve files based on the URL, making use of efficient string manipulation and error handling. The compilation requires a C compiler (like GCC), and the program should be executed with a port number passed as a command-line argument.

Project Scope

Develop a fully functional web server that serves static files and demonstrates proficiency in low-level programming, file handling, and process management. This project is ideal for understanding how web servers work under the hood and can serve as a foundation for more advanced server implementations.

CPU Circuit Diagram

Project Details

Start: 2024-10-08
End: 2024-10-24

Technologies

C
JS
View on GitHub