CloudVisionApps/FastHttp
FastHTTP - High performance web server
FastHTTP
Lightning-fast web server for PHP applications โก
FastHTTP is a high-performance, modern web server built in Go, designed to handle multiple virtual hosts with PHP-FPM integration. Perfect for developers who want speed, simplicity, and powerful features without the complexity.
Why FastHTTP?
๐ Blazing Fast - Built with Go for exceptional performance
๐ง Easy Configuration - Simple JSON-based configuration
๐ Multi-Site Ready - Run multiple virtual hosts effortlessly
๐ Secure by Default - Built-in rate limiting and security features
๐ Admin Panel - Modern web interface for server management
๐ Migration Tools - Easy migration from Apache/httpd
Quick Start
Installation
git clone https://github.com/CloudVisionApps/FastHTTP.git
cd FastHTTPBasic Configuration
Create a fasthttp.json file:
{
"listen": ["80"],
"virtualHosts": [
{
"serverName": "example.com",
"documentRoot": "/var/www/example.com",
"phpProxyFCGI": "127.0.0.1:9000"
}
]
}Start the Server
./fasthttp startThat's it! Your server is now running. ๐
Key Features
- โ PHP-FPM Integration - Seamless FastCGI support
- โ Multiple Virtual Hosts - Host unlimited websites
- โ SSL/TLS Support - Per-virtual-host SSL configuration
- โ Location Blocks - Advanced path-based routing
- โ CGI & Proxy Support - Handle any application type
- โ Rate Limiting - Built-in DDoS protection
- โ Admin API - REST API + React admin panel
- โ Apache Converter - Migrate from Apache in seconds
Basic Usage
# Start server
./fasthttp start
# Stop server
./fasthttp stop
# Check status
./fasthttp status
# Convert Apache config
./fasthttp convert --from apache --input httpd.conf --output fasthttp.jsonExample Configuration
Here's a real-world example showing multiple sites with different features:
{
"listen": ["80", "443"],
"rateLimitRequests": 100,
"rateLimitWindowSeconds": 60,
"adminEnabled": true,
"adminPort": "8080",
"virtualHosts": [
{
"serverName": "mysite.com",
"serverAlias": ["www.mysite.com"],
"documentRoot": "/var/www/mysite.com",
"phpProxyFCGI": "127.0.0.1:9000",
"locations": [
{
"path": "/api",
"matchType": "prefix",
"handler": "proxy",
"proxyUnixSocket": "/var/run/api.sock",
"proxyType": "http"
}
],
"ssl": {
"enabled": true,
"certificateFile": "/etc/ssl/certs/mysite.com.crt",
"certificateKeyFile": "/etc/ssl/private/mysite.com.key"
}
},
{
"serverName": "blog.mysite.com",
"documentRoot": "/var/www/blog",
"phpProxyFCGI": "127.0.0.1:9001"
}
]
}This configuration demonstrates:
- Multiple virtual hosts on the same server
- SSL/TLS for secure connections
- Location blocks for API proxying
- Rate limiting protection
- Admin panel access
Admin Panel
Enable the admin panel by adding to your config:
{
"adminEnabled": true,
"adminPort": "8080"
}Then access it at http://localhost:8080 for a beautiful web interface to manage your server.
Documentation
- ๐ Advanced Documentation - Complete technical reference
- ๐ Admin API Docs - REST API documentation
- ๐ Parser Docs - Configuration parser details
Contributing
Contributions are welcome! Feel free to fork, create a branch, and submit a pull request.
License
MIT License - see LICENSE file for details.
Built with โค๏ธ for developers who value speed and simplicity