A high-performance, lightweight, multi-tenant, multi-site web hosting and CMS engine built in native PHP without database dependencies.
Simple Hosting Platform is a self-contained, multi-tenant, multi-site web hosting and lightweight CMS engine. It handles automated tenant provisioning, real-time resource metering (bandwidth and disk usage), access control, and tenant management without relying on database systems.
All platform data—including configurations, accounts, resource quotas, and sessions—is managed via flat files using thread-safe file-locking mechanisms (flock) to maintain data integrity under concurrent requests.
- Multi-Tenant Architecture: Centralized core (
/c3) serving multiple isolated tenant environments. Updates to the core instantly apply across all tenant sites. - Database-Free (Flat-File): Serialized array storage utilizing file-locking mechanisms (
flock) for thread-safe operations in high-concurrency scenarios. - Real-Time Resource Metering:
- Bandwidth: Precise byte-counting per HTTP response.
- Disk Usage: Real-time directory storage calculations.
- Automated Quota Enforcement: Suspends or restricts access upon exceeding allocated limits.
- Native Brute-Force Defense: Built-in rate-limiting firewall (
security.php) that dynamically throttles and blocks suspicious IP addresses based on request frequency. - Password Security: Implements native PHP
password_hash()(Bcrypt) andpassword_verify()across all administration panels. - Built-In File Manager & WYSIWYG Editor: Fully integrated file browser (navigation, upload, rename, move, delete) and
TinyMCEvisual editor for HTML manipulation (can be replaced with another likeMonaco). - Automated Tenant Provisioning: Instant site creation via ZIP template extraction with configurable trial periods (10-minute default / coupon extension support).
- PHP Version: PHP 7.4 or PHP 8.x.
- Required PHP Extensions:
php-zipphp-jsonphp-sessionphp-mbstringphp-gd(optional)
- Web Server: Turbo (included, v2.3.rc3, for Windows & Linux, AMD64).
- localhost/ (All hosting platform dir)
├── # # Wildcard subdomain sites dir
│ ├── fullchain.pem # Wildcard subdomain SSL cert fullchain file (replace with production cert file)
│ ├── privkey.pem # Wildcard subdomain SSL cert privkey file (replace with production cert file)
│ └── @ # WILDCARD SITES handler dir (Hosted sites handler)
│ ├── c3/ # CENTRAL CORE ENGINE
│ │ ├── adapter.php # Routing & request adapter
│ │ ├── apanel/ # Tenant client admin panel
│ │ ├── requests/ # Static/Dynamic request handlers
│ │ ├── security/ # Anti-brute-force rate limiter
│ │ └── uses/ # Sessions, timezone, and utilities
│ │
│ ├── legacy.localhost/ # HOSTING SITE (Admin & Order Console)
│ │ ├── cfg/docs/ # Hosting administration panels & app files
│ │ ├── dynamics.php # Hosting primary dynamic router
│ │ ├── editor/ # Per hosted site (including Hosting Site) TinyMCE editor files
│ │ └── ... # Hosting static assets
│ │
│ ├── prueba.localhost/ # HOSTED TENANT Site Demo
│ │
│ └── ... # Hosting config & cost files (do not edit manually)
│
├── @ # MAIN SITE landing page & assets dir
├── fullchain.pem # Main site SSL cert fullchain file (replace with production cert file)
└── privkey.pem # Main site SSL cert privkey file (replace with production cert file)
- turbo (Turbo Linux binary)
- turbo.exe (Turbo Windows binary)
- turbo.config (Turbo cross-platform configuration)
- LICENSE (Simple Hosting Platform AGPLv3 License)
- README.md (This file)
NOTE: Folder names like
@or#are Turbo server conventions. Visit its documentation or check out the repository for more information.
-
Clone the repository:
git clone https://github.com/okzgn/simple-hosting-platform-2019-php.git
-
Run Server: Enter the project directory and execute the Turbo server binary:
- On Linux / macOS:
cd ./simple-hosting-platform-2019-php/ chmod +x ./turbo ./turbo - On Windows (Command Prompt / PowerShell):
cd simple-hosting-platform-2019-php turbo.exe
- On Linux / macOS:
-
Wildcard Subdomain Sites (Hosted sites) Handler PHP Configuration:
- Open your browser and navigate to the Turbo server GUI:
http://localhost/admin: - Navigate to
localhostand select the wildcard (*) subdomain. - Configure the Preprocessor for the
phpextension, pointing to your local PHP binary (e.g.,C:\php\php-cgi.exeor/usr/bin/php-cgi).
- Open your browser and navigate to the Turbo server GUI:
-
Save Server Configuration & Test It:
- Access the Main Site at
http://localhost/or the Hosting Site athttp://legacy.localhost/to place orders. - To manage orders, visit
http://legacy.localhost/orders/panel. - To access the master admin panel, visit
http://legacy.localhost/admin/panel. - Default credentials:
- User:
admin - Password:
adminpwd
- User:
⚠️ IMPORTANT: Change the default credentials (admin/adminpwd) immediately after logging in for the first time athttp://legacy.localhost/admin/panel.💡 Local Subdomains Note: Modern browsers automatically resolve
*.localhostto127.0.0.1. If your system does not, add127.0.0.1 legacy.localhostto your system'shostsfile.- NOTE: The Turbo server root folder must be set to the parent directory of the project's
localhostfolder, usuallysimple-hosting-platform-2019-php.
- Access the Main Site at
By default, the codebase references legacy.localhost as the master domain for local development and testing. When preparing for production:
- Perform an exhaustive global search-and-replace across the entire project for
legacy.localhostand replace all occurrences with your actual master domain (e.g.,yourdomain.com). - Ensure your DNS provider includes a Wildcard A/AAAA record (
*.yourdomain.com) pointing to your server's IP address so automated tenant subdomains resolve correctly. - If you put your server behind a reverse proxy (like Nginx or Cloudflare), all IPs will appear to be that of the proxy, potentially banning all your users at once. Consider reading headers like
HTTP_X_FORWARDED_FOR(instead of$_SERVER['REMOTE_ADDR']) if you trust the proxy.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for full details.
Copyright (c) 2019-2026 OKZGN