A lightning-fast ⚡ custom HTTP server implementation in C++98, designed to handle HTTP requests and serve web content with style! 🎨
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
- 🎯 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
- 🛠️ C++98 compatible compiler
- 🔧 Make
- 🐧 Linux/Unix environment
# Build the project
make
# Build with debug flags
make debug
# Clean object files
make clean
# Clean everything and rebuild
make re
- 🎧
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
- ⚙️ Configure your server in
webserv.conf
- 🏗️ Build the project using
make
- 🚀 Run the server:
./webserv