mulvox-http3 webrule
🌐 Wiki Dokumentasi
Selamat datang di repositori dokumentasi Protindo-HTTP3. Webserver ini menggunakan arsitektur berbasis aturan (rules-engine) yang fleksibel untuk mengelola trafik, keamanan, dan optimasi performa melalui file konfigurasi JSON.
1 Konfigurasi Global
| Parameter | Tipe | Deskripsi | Default |
|---|---|---|---|
| gzip | Boolean | Kompresi Gzip untuk teks. | true |
| directory_listing | Boolean | Daftar file folder. | false |
"global": {
"gzip": true,
"directory_listing": false,
"default_index": ["index.php", "index.html"],
"max_body_size_mb": 50
}
2 Logika Pemrosesan Aturan
Aturan diproses berdasarkan urutan Priority (angka terkecil ke terbesar).
stop_on_match: false – Server akan terus mengevaluasi aturan berikutnya meskipun aturan saat ini cocok, kecuali aksi tersebut bersifat terminasi (seperti deny atau redirect).
🛡️ Keamanan (Security)
1. Force HTTPS (Prio: 1)
Mengarahkan trafik HTTP ke HTTPS secara otomatis.
{
"name": "Force HTTPS",
"priority": 1,
"condition": { "protocol": "http" },
"action": { "type": "redirect", "status": 301, "target": "https://{host}{uri}" }
}
2. Block Bad IP (Prio: 3)
{
"name": "Block Bad IP",
"priority": 3,
"condition": { "ip_in": ["192.168.1.10", "203.0.113.25"] },
"action": { "type": "deny", "status": 403 }
}
3. Rate Limit API (Prio: 5)
{
"name": "Rate Limit API",
"priority": 5,
"condition": { "path_prefix": "/api" },
"action": { "type": "rate_limit", "requests": 100, "per_seconds": 60, "key": "{ip}", "status": 429 }
}
🛤️ Routing & Pengalihan
1. WWW Redirect (Prio: 2)
{
"name": "WWW Redirect",
"priority": 2,
"condition": { "host_equals": "example.com" },
"action": { "type": "redirect", "status": 301, "target": "https://www.example.com{uri}" }
}
2. API Proxy Pass (Prio: 7)
{
"name": "API Proxy Pass",
"priority": 7,
"condition": { "path_prefix": "/microservice" },
"action": { "type": "proxy_pass", "target": "http://127.0.0.1:3001", "preserve_host": true, "timeout_ms": 5000 }
}
Format Variabel Dinamis
-
{host}Nama host / domain request.
-
{uri}Path lengkap request.
-
{ip}Alamat IP klien.
-
{document_root}Lokasi fisik folder web.
Leave a Reply