Skip to content

valentinValep/Webserv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webserv

WebServ is an HTTP server project developed as part of the 42 school common core curriculum. It is implemented in C++98 and is designed to handle HTTP requests similar to NGINX, allowing users to serve static files or dynamic content through CGI.

Features

  • HTTP server capable of handling GET, POST, and DELETE methods
  • Supports serving static files and dynamic content via CGI
  • Uses the epoll function to handle multiple client connections concurrently
  • Implements error codes to handle bad requests

HTTP Protocol Overview

The Hypertext Transfer Protocol (HTTP) is an application layer protocol used for communication between web browsers and servers. It operates over TCP/IP and defines how messages are formatted and transmitted, as well as what actions web servers and browsers should take in response to various commands.

Common Gateway Interface (CGI)

CGI is a standard protocol for interfacing external applications with web servers. It allows a web server to execute programs on the server and return dynamic content to the client. In the context of WebServ, CGI is used to generate dynamic content in response to HTTP requests.

UML Class Diagram

Below is a visual representation of the structure and relationships between the classes in our WebServ project, presented through an UML Class Diagram:

Class Diagram

Usage

  1. Clone or download the repository.

  2. Navigate to the project directory:

cd Webserv
  1. Compile the project using make:
make
  1. Create static files and configure the server according to your requirements. An example configuration file and site directory is provided in the repository.

  2. Launch the program:

./Webserv <optionnal: path to configuration file>

Credits

This project was developed by djfg0, chmadran and valentinValep.

About

Simple HTTP 1.1 Web server inspired by NGINX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.7%
  • HTML 6.1%
  • Python 2.4%
  • Makefile 1.8%
  • CSS 1.6%
  • PHP 0.4%