wbsrv
is a high-performance, extensible web server designed for handling modern web workloads with maximum efficiency. Built in C++20 and powered by Proxygen.
⚠️ Disclaimer: This project is under active development and is not yet production-ready.
- High Performance – Handles thousands of concurrent connections with event-driven architecture.
- Scalable – Easily configurable for multi-threaded deployments on multi-core systems.
- Easy to Configure – YAML-based configuration files for server and virtual hosts.
- Smart Caching – Built-in to store frequently accessed content in memory.
- PHP Support – Native support for embedded PHP execution using the Embed SAPI.
- Extensions API for Developers – Add new features yourself. Check out the example.
Ensure the following tools and libraries are installed on a Linux-based system:
- CMake
- A C++20-compatible compiler (originally developed with Clang, not sure about GCC compatibility)
- Vcpkg
- Proxygen and dependencies
yaml-cpp
(for configuration parsing)
sudo apt update
sudo apt install -y build-essential cmake clang git libssl-dev
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install proxygen yaml-cpp
git clone https://github.com/master-of-darkness/wbsrv.git
cd wbsrv
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..
cmake --build .
- Release Mode: Optimized, runs as a background service.
- Debug Mode: Includes debug symbols, runs in the foreground.
Create a server.yaml
by path /etc/wbsrv/
file to specify global server settings:
threads: 6
Within the same directory, create a hosts/
folder with individual virtual host configurations. Example: hosts/localhost.yaml
www_dir: "/path/to/static/files"
hostname: "localhost"
certificate: "/path/to/cert.csr"
private_key: "/path/to/key.key"
password: "/path/to/password" # Leave empty if no password
port: 11001
ssl: true
index_page: ['index.html']
From the build
directory:
./wbsrv
For best performance, use the Release build in production-like environments.
- Proxygen – HTTP framework
- yaml-cpp – YAML configuration parser
- xxHash - Fast hashing library for caching
Planned features include:
- File upload support
- URL-based caching for dynamic routes
- Advanced logging and access control
- WebSocket support
- Improved interface for caching container
Contributions are welcome! I'm open to pull requests, issues and critiques.