A CustomBuild configuration rewrite regenerates managed web-server settings from DirectAdmin state and templates. It is appropriate after a documented stack or template change, but it can replace unsupported manual edits. It does not repair application code or recover deleted website content.
IN THIS ARTICLE
Information to have ready
Use an authorized server administrator. Record the reason for the rewrite and preserve relevant generated configuration and supported custom templates. Review whether a narrower domain-specific regeneration is sufficient before touching the shared stack.
01 Plan and verify the configuration rebuild
- Inspect the current webserver and PHP options and confirm they match the installed components.
- Review custom templates and domain custom HTTPD fields for syntax and compatibility. Move required unsupported direct edits into a supported custom location before regeneration.
- Run the vendor-documented
da build rewrite_confsoperation when a full rewrite is required. Capture the output and wait for completion rather than launching it repeatedly. - Read validation errors and service reload results. Correct the specific invalid custom directive or missing component before attempting another rewrite.
- Test representative domains, including a customized site, a PHP site and a static site. Check HTTP and HTTPS behaviour and relevant service logs.
How do I check the regenerated web-server configuration?
Confirm generated configuration reflects the intended options and that services remain healthy. Verify custom directives survived because they reside in supported inputs. Keep the before-and-after record for the next maintenance review.
Troubleshoot unexpected results
If a manual edit disappears, restore its intent through the documented custom mechanism rather than pasting it repeatedly into generated files. If a rewrite exposes a mismatch between configured and installed components, resolve the stack inconsistency through CustomBuild. Do not run da build all blindly or delete customer configuration to clear a failure. Recover the last known good inputs and seek support with the exact error.