The rebuildhttpdconf Script
Valid for versions 82 through the latest version
Last modified: January 20, 2022
You can use the
/usr/local/cpanel/scripts/rebuildhttpdconf script to rebuild Apache’s main configuration file.
This script does not restart Apache. To restart Apache, run the restartsrv_httpd script.
The system automatically updates Apache's configuration as needed, so you may not need to run this script manually at all.
Run the script
To run this script on the command line, use the following format:
/usr/local/cpanel/scripts/rebuildhttpdconf --preview --nolock
Use the following options with this script:
||Creates a file named
||Usually, the system locks the configuration file during the rebuilding process to prevent two processes from conflicting. This option disables that lock.||
If the script succeeds, it will return output similar to the following example: