Skip to content

A lightweight, fast HTTP/1.1 server in C++, built for performance and learning. Nginx-inspired and capable of serving static files and dynamic content via CGI.

Notifications You must be signed in to change notification settings

pquline/webserv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 WebServ

Webserv

A lightning-fast ⚡ custom HTTP server implementation in C++98, designed to handle HTTP requests and serve web content with style! 🎨

🏫 About

This project is part of the 42 school curriculum, where we implement a custom HTTP server from scratch. As students at 42 Paris, we've created this server to demonstrate our understanding of web protocols, socket programming, and system programming concepts.

Team: icr4m, Roychrltt, pquline

✨ Features

  • 🎯 Multi-server configuration support with multiple ports
  • 🛠️ Configurable server blocks with multiple locations
  • 🔄 Support for GET, POST, and DELETE methods
  • 🐍 CGI script execution support
  • 📂 Auto-indexing for directories
  • ❌ Custom error pages
  • 📏 Client body size limits
  • 🌐 Server name and alias support
  • 🔀 URL redirection support
  • 📁 Multiple root directories support

📋 Requirements

  • 🛠️ C++98 compatible compiler
  • 🔧 Make
  • 🐧 Linux/Unix environment

🏗️ Building the Project

# Build the project
make

# Build with debug flags
make debug

# Clean object files
make clean

# Clean everything and rebuild
make re

🔧 Configuration Options

  • 🎧 listen: Port number(s) to listen on (multiple ports supported)
  • 📦 client_max_body_size: Maximum size of client request body
  • 🌐 server_name: Server name and optional aliases
  • 📁 root: Root directory for serving files
  • 📂 autoindex: Enable/disable directory listing
  • 🔄 methods: Allowed HTTP methods (GET, POST, DELETE)
  • error_page: Custom error pages
  • 🔀 redirection: URL redirections
  • 📑 index: Default index files for locations

🚀 Usage

  1. ⚙️ Configure your server in webserv.conf
  2. 🏗️ Build the project using make
  3. 🚀 Run the server: ./webserv

About

A lightweight, fast HTTP/1.1 server in C++, built for performance and learning. Nginx-inspired and capable of serving static files and dynamic content via CGI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •