The rebuildhttpdconf Script
Valid for versions 82 through the latest version
Version:
82
Last modified: January 20, 2022
Looking for this interface?
Note:
Your hosting provider can enable or disable this interface for resellers in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).
Overview
You can use the /usr/local/cpanel/scripts/rebuildhttpdconf
script to rebuild Apache’s main configuration file.
Important:
This script does not restart Apache. To restart Apache, run the restartsrv_httpd script.
Note:
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
Options
Use the following options with this script:
Options | Description | Example |
---|---|---|
--preview |
Creates a file named httpd-preview.conf instead of httpd.conf . This allows you to inspect the configuration file before you use it on your system. |
/usr/local/cpanel/scripts/rebuildhttpdconf --preview |
--nolock |
Usually, the system locks the configuration file during the rebuilding process to prevent two processes from conflicting. This option disables that lock. | /usr/local/cpanel/scripts/rebuildhttpdconf --nolock |
Success
If the script succeeds, it will return output similar to the following example:
|
|