A simple C++ HTTP web server implementation following the 42 school project specifications.
This project requires a C++17-compatible compiler.
git clone https://github.com/hienptx/42_Mini_Http_Server.git
cd 42_Mini_Http_ServermakeThis compiles all source files in the src/ directory and creates the webserv executable in the project root.
./webserv webserv.confwebserv.confis the configuration file describing server blocks, ports, routes, etc.- The format and syntax follow an nginx-style layout.
.
├── includes/ # Header files
├── obj/ # Compiled object files (generated)
├── src/ # Source code files
├── webserv.conf # Example configuration file
├── webserv # Final executable (after make)
└── Makefile # Build system
- HTTP 1.1 compliant
- Supports GET, POST, and DELETE methods
- Static file serving
- CGI execution
- Configurable routing via
webserv.conf - Handles multiple client connections using select/poll
Run the server:
./webserv webserv.confAccess it in your browser:
http://localhost:<configured_port>
make clean # Remove object files
make fclean # Remove object files and executable
make re # Full rebuildThis project is for educational purposes under the 42 school curriculum.