Webserv is a lightweight HTTP server written in C++98, built from scratch as part of the 42 school curriculum. It is already capable of serving static websites and handling basic HTTP requests, but it is still under active development and subject to change.
- HTTP/1.1 support
- Configurable via configuration file (inspired by NGINX)
- Non-blocking I/O using
poll()(or equivalent) - Static file serving
- Default error pages
- Supports GET, POST, and DELETE
- CGI support (e.g., PHP, Python)
- File uploads
- Directory listing and default index files
- Multiple server blocks and ports
make
./webserv [config_file]A configuration file allows you to define:
- Host and port
- Server names
- Routes and HTTP methods
- Root directories and index files
- Upload directories
- CGI handling
- Redirections
- Error pages
This project is functional but not production-ready. The codebase is evolving, and changes may occur as development continues.
- C++98
- No external libraries (including Boost)
- Compatible with macOS and Linux
MIT