Field testing revealed that CMD_API_CUSTOM_HTTPD requires admin-level
access that conflicts with user-level domain ownership in DirectAdmin.
No single Login Key can satisfy both requirements, making the SDOCROOT
document root override approach unusable in real DA deployments.
The adapter now works with DirectAdmin's default directory structure:
1. Create subdomain via CMD_API_SUBDOMAINS (unchanged)
2. Move provisioned VoxelSite files from storage/instances/{slug} into
the subdomain directory DA creates at public_html/{slug}/
3. Update the instance's document_root in the database to the real path
Cross-device moves are handled automatically (rename with copy+delete
fallback). DA's default index.html is replaced during the move.
What was removed:
- CMD_API_CUSTOM_HTTPD calls (set/get custom HTTPD config)
- rawApiGet() method (only existed for custom HTTPD reads)
- SDOCROOT template syntax injection (DA pipe/conditional blocks)
- SWARM_DOCROOT fence markers for config isolation
- Log redaction of config field (no config payloads to redact)
- CMD_API_CUSTOM_HTTPD from Login Key requirements (3 to 2 commands)
What was added:
- getSubdomainDir() with auto-detection of DA's subdomain path
(default: /home/{user}/domains/{domain}/public_html/{slug})
- da_docroot_base config field for non-standard DA layouts
- File move + document_root update in createSubdomain()
- recursiveCopy/recursiveDelete for cross-device move fallback
- 'Why Not CMD_API_CUSTOM_HTTPD?' section in docs
Login Key now requires only CMD_API_SUBDOMAINS and CMD_API_SHOW_DOMAINS.
Test coverage: 65 behavioral assertions (down from 85 — removed HTTPD
config tests, added file move, path detection, and simplified HTTP
status tests).