πΊπ WolfServe
High-Performance PHP Web Server
Overview
WolfServe is a high-performance web server written in Rust that serves PHP applications via FastCGI with native SSL/TLS support and Apache configuration compatibility. It's a drop-in replacement for Apache2 β just point it at your existing Apache vhost configs and go.
Β© 2026 Wolf Software Systems Ltd β GitHub Repository
Blazing Fast
Built on Axum & Tokio for maximum async performance. Handles thousands of concurrent connections.
PHP Support
Execute PHP files via FastCGI (php-fpm or php-cgi). Full PHP 7.4+ compatibility.
SSL/TLS
Native HTTPS support with SNI for multiple domains on a single IP. Let's Encrypt ready.
Apache Compatible
Reads existing Apache vhost configurations directly. No config rewrite needed.
Static Files
Serves static assets efficiently with proper MIME types and caching headers.
PHP FFI Bridge
Call Rust functions directly from PHP via libwolflib.so using FFI.
Admin Dashboard
Built-in web dashboard on port 5000 for real-time monitoring, stats, and request logging.
Cross-Platform
Debian/Ubuntu, Fedora/RHEL, Arch Linux, openSUSE β all supported out of the box.
Requirements
- Linux with systemd
- Rust 1.70+ (for building from source)
- PHP 7.4+ with php-fpm
Quick Start
Option 1: Install from Source
# Clone the repository
git clone https://github.com/wolfsoftwaresystemsltd/wolfserve.git
cd wolfserve
# Run the installer (requires root)
sudo ./install.sh
# Start the server
./run.sh
Option 2: Install Precompiled Binaries
# Download the release package
tar -xzf wolfserve-x86_64-YYYYMMDD.tar.gz
cd wolfserve-x86_64-YYYYMMDD
# Run the installer (requires root)
sudo ./install_precompiled.sh
Option 3: Install as a Service
# Build and install as systemd service
sudo ./install_service.sh
# The server will start automatically
systemctl status wolfserve
Configuration
Edit wolfserve.toml:
[server]
host = "0.0.0.0"
port = 3000
[php]
fpm_address = "127.0.0.1:9993"
session_save_path = "/var/lib/php/sessions"
[apache]
# Load existing Apache vhost configs
# Debian/Ubuntu: "/etc/apache2"
# Fedora/RHEL: "/etc/httpd"
config_dir = "/etc/apache2"
Admin Dashboard
WolfServe includes a built-in admin dashboard at http://your-server:5000/ for
monitoring and statistics.
Features
- Real-time statistics: Total requests, response codes (2xx/3xx/4xx/5xx), avg response time, requests/sec
- Request logging: Last 50 requests with method, path, status, duration, client IP, and host
- Uptime tracking: Server uptime displayed in days, hours, minutes, seconds
- Auto-refresh: Dashboard updates every 5 seconds
- Secure authentication: Session-based login with bcrypt password hashing
Default Credentials
| Field | Value |
|---|---|
| Username | admin |
| Password | admin |
wolfserve_admin.dat using bcrypt hashing.
Multi-Server PHP Sessions
WolfServe supports shared PHP sessions across multiple servers, enabling seamless load balancing without sticky sessions.
Configuration
Set session_save_path in wolfserve.toml to a shared network location:
[php]
fpm_address = "127.0.0.1:9993"
session_save_path = "/mnt/shared/wolfserve/sessions"
How It Works
- User logs in on Server A β session file created at
/mnt/shared/wolfserve/sessions/sess_abc123 - Next request routed to Server B β reads the same session file from shared storage
- User stays logged in seamlessly across all servers
Requirements
- All servers must mount the same shared storage (NFS, GlusterFS, Ceph, etc.)
- Clocks should be synchronized (NTP) for consistent session expiry
- The installer automatically sets correct permissions (
chmod 1733with sticky bit)
Interactive Installation
sudo ./install_service.sh
π Configuration Options (press Enter to accept defaults)
Server bind address [0.0.0.0]:
Server port [3000]:
PHP-FPM port [9993]:
PHP session save path [/var/lib/php/sessions]: /mnt/shared/wolfserve/sessions
Apache config directory [/etc/apache2]:
Non-Interactive Installation
Use environment variables for automated deployments:
sudo WOLFSERVE_SESSION_PATH="/mnt/shared/wolfserve/sessions" \
WOLFSERVE_PORT="3000" \
./install_service.sh -y
| Environment Variable | Default | Description |
|---|---|---|
WOLFSERVE_HOST |
0.0.0.0 |
Bind address |
WOLFSERVE_PORT |
3000 |
HTTP port |
WOLFSERVE_FPM_PORT |
9993 |
PHP-FPM port |
WOLFSERVE_SESSION_PATH |
/var/lib/php/sessions |
Session storage path |
WOLFSERVE_APACHE_DIR |
/etc/apache2 |
Apache config directory |
PHP FFI Integration
WolfServe includes libwolflib.so, a Rust library that can be called directly from
PHP using FFI:
<?php
$ffi = FFI::cdef("
int wolf_add(int a, int b);
char* wolf_greet(const char* name);
void wolf_free_string(char* s);
", "/opt/wolfserve/libwolflib.so");
// Call Rust from PHP!
$result = $ffi->wolf_add(10, 32); // Returns 42
$greeting = $ffi->wolf_greet("World");
echo FFI::string($greeting); // "Hello, World from Rust!"
$ffi->wolf_free_string($greeting);
Migration from Apache
Switching from Apache to WolfServe:
# Debian/Ubuntu
sudo systemctl stop apache2 && sudo systemctl disable apache2
# Fedora/RHEL
sudo systemctl stop httpd && sudo systemctl disable httpd
# Install & start WolfServe
sudo ./install_service.sh
sudo systemctl enable wolfserve
WolfServe reads your existing Apache vhost configurations from
/etc/apache2/ (or /etc/httpd/ on RHEL) β no config changes needed.
Service Management
# Start / stop / restart
sudo systemctl start wolfserve
sudo systemctl stop wolfserve
sudo systemctl restart wolfserve
# Enable on boot
sudo systemctl enable wolfserve
# Check status
sudo systemctl status wolfserve
# View logs
sudo journalctl -u wolfserve -f
Project Structure
wolfserve/
βββ src/
β βββ main.rs # Main server code
β βββ apache.rs # Apache config parser
β βββ admin.rs # Admin dashboard & authentication
βββ wolflib/ # Rust library for PHP FFI
β βββ src/lib.rs
βββ public/ # Web root directory
β βββ index.php
β βββ rust.php # PHP FFI example
βββ install.sh # Source installation script
βββ install_service.sh # Systemd service installer
βββ install_precompiled.sh # Precompiled binary installer
βββ wolfserve.toml # Server configuration