Use supported Apache includes for server configuration that WHM does not expose directly. Editing the generated main configuration can be overwritten by rebuilds and makes future maintenance harder to reason about.
IN THIS ARTICLE
What you need before you begin
Confirm root-level authority and identify whether the directive belongs globally or to one virtual host. Save existing includes, establish a syntax-validation method and keep a recovery session available.
01 Use supported Apache include configuration in WHM
- Open Apache Configuration > Include Editor for an appropriate global include, or use the documented per-virtual-host include mechanism for a domain-specific change.
- Choose the correct insertion stage and Apache-version scope. A pre-virtual-host or post-virtual-host location does not automatically limit a directive to one customer.
- Add only the reviewed directives, with a short administrative comment explaining their purpose and scope. Avoid duplicate settings that conflict with other includes.
- Update and validate the resulting configuration through the supported workflow before applying any required reload or restart. Preserve the validation output.
- Test the affected domain and at least one unrelated site, then monitor the web-server error log. Keep the include under change control for later upgrades.
02 Example: check Apache syntax without restarting it
After the supported cPanel configuration workflow has included the reviewed change, use the apachectl belonging to that managed Apache installation. If it is not in the administrator’s command path, use the verified full path for the server.
apachectl configtest
A successful syntax check reports Syntax Ok. If it reports an error, inspect the named file and line, correct or restore the include, and check again before applying a reload or restart.
This check parses configuration; it does not prove that a directive is scoped to the intended customer or that every application route works. Continue with the affected-domain and unrelated-domain tests described above, using the supported WHM service workflow for any required reload.
Confirm the expected result
The intended behaviour should persist through a supported configuration rebuild without changing unrelated virtual hosts. The configuration should pass syntax checks before the service is considered healthy.
Troubleshoot unexpected results
If validation fails, restore the saved include and correct the directive or context. Do not repeatedly restart Apache with a known invalid configuration. An All Versions include needs review when future software changes affect supported directives.
Can a global include fix just one customer safely?
Only if its directives are correctly scoped. Prefer the documented per-domain mechanism when the requirement belongs to one virtual host, and verify unrelated sites after deployment.