webserv
The goal of this project is to create its own HTTP server. It should be inspired by Nginx and run on a web browser.
Project overview
Webserv is the only C++ project in the 42 School core curriculum (although it is preceded by CPP modules).
The goal is to create an HTTP server in C++ 98, strongly inspired by the open source Nginx web server.
There is therefore a whole configuration aspect to consider, including the ability to:
-
create multiple server directives,
-
create multiple location directives within each server directive,
-
manage different modifiers for each location directive (for instance: ‘/’ and ‘=’),
-
set the listening port (8080 by default),
-
define a hostname.
This list is not exhaustive.
Group organization and task assignment
Webserv is a group project involving two or three people.
We decided to do it as a team of three and divide the project into the following parts:
-
Parsing of the configuration file, in order to check its validity and send the information to the server
-
Management of the server, sockets and polling
-
Common Gateway Interface (CGI) management in order to be able to upload, display and delete files on the server
My role in this project
Within this group, I worked on the server side.
The main technical constraint of this project is to create a server that is non-blocking.
This means that it must:
-
never stop running,
-
always be listening for new incoming customer connections,
-
always respond to customer requests.
To do this, it is necessary to use I/O multiplexing, a concurrent programming technique.
Through the epoll() system call, this allows listening to multiple sockets (i.e. client connections) simultaneously.
For more technical information on this subject, you can check out the repository of this project on my GitHub profile (the link is available below on this page).
Because a picture speaks a thousand words


Would you like to check out the project code and test it by yourself?
Similar projects
ft_transcendence
This project is centered around the design, development and organization of a full-stack web...
Inception
This project aims to expand its knowledge of system administration using Docker. It requires the...
CPP Module 09
This module is designed to learn and understand containers in C++.
CPP Module 08
This module is designed to provide an understanding of templated containers, iterators and...
CPP Module 07
This module is designed to learn and understand C++ templates.
CPP Module 06
This module is designed to learn and understand different casting types in C++.
CPP Module 05
This module is designed to learn and understand try/catch and exceptions in C++.
CPP Module 04
This module is designed to understand polymorphism through subtyping, abstract classes and...
CPP Module 03
This module is designed to learn and understand inheritance in C++.
CPP Module 02
This module is designed to understand ad hoc polymorphism, function overloading and orthodox...
CPP Module 01
This module is designed to understand memory allocation, references, member pointers and the use of...
CPP Module 00
This first C++ module is designed to understand the differences between this language and C...
This project seems similar to yours?
If you think that skills developed through this project could be useful to your own project, please contact me using the button below.