site_configuration_update
Update nginx, Apache, and PHP configuration for a FastPanel site. Supports partial updates and includes a dry-run mode to preview changes before applying.
Instructions
Replace the nginx (frontend), apache (backend) and php.ini config for a site. DANGEROUS: invalid syntax can take down the site or the whole nginx/apache service — this tool does NOT validate nginx syntax before applying (no nginx -t), so preview with dry_run and double-check by hand. ⚠️ SIDE EFFECT — manual mode: the first config update flips the site to manual_changes=true on the panel side. After that, FastPanel STOPS managing this site's config: it will no longer auto-insert the 443 server block, the HTTP→HTTPS redirect, or Let's Encrypt renewal/acme-challenge locations when you issue or renew SSL. You become responsible for the full HTTPS block (including ssl_certificate paths — get them from certificates_list crt_path/key_path). Partial update IS supported here (unlike the raw API): omit any of frontend/backend/phpini and the tool fetches the current value via site_configuration_get and sends it back unchanged, so you can safely change just one block. Endpoint: PUT /api/sites/{site_id}/configuration. WRITE — confirm:true required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| phpini | No | Full php.ini overrides for this site. Omit to keep current. | |
| backend | No | Full apache/httpd config for this site (VirtualHost block). Omit to keep current. | |
| confirm | No | ||
| dry_run | No | ||
| site_id | Yes | Site id from sites_list | |
| frontend | No | Full nginx config for this site (HTTPS server block + HTTP redirect block). Omit to keep current. |