Web hosting¶
Architecture¶
Docker-based shared hosting:
Traefik (SSL) → hosting-webserver (nginx) → hosting-php84 (FPM via TCP:9000)
→ hosting-sftp (Port 2222)
- SSLterminated on Traefik (nginx only internal port 80)
- PHP-FPMvia TCP
hosting-php84:9000(not Unix Socket) - Traefik-Routenare generated by the Platform API (
/etc/xynap/traefik/conf.d/hosting-routes.yml)
Sites¶
Create a Site¶
List Site¶
Site suspend / activate¶
Databases¶
# Datenbanken einer Site
GET /api/v1/hosting/sites/{id}/databases
# Datenbank erstellen
POST /api/v1/hosting/sites/{id}/databases
{"name": "wp_main", "password": "auto-generated"}
# Datenbank loeschen
DELETE /api/v1/hosting/databases/{id}
File system¶
Customer data are below:
/var/lib/xynap/customers/{customer_id}/{domain}/
├── htdocs/ # DocumentRoot
├── logs/ # Access + Error Logs
└── tmp/ # PHP Temp
vHost generation¶
The Platform API generates nginx-vHosts via Jinja2-Templates:
- Template:
app/modules/hosting/templates/vhost.conf.j2 - Output:
/etc/xynap/hosting/vhosts/{domain}.conf
FPM pool content:
- Template:
app/modules/hosting/templates/fpm-pool.conf.j2 - Output:
/etc/xynap/hosting/php-fpm/{domain}.conf