Vidensdatabase

The rebuildhttpdconf Script  Print denne artikel

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:

1
2
3
4
5
6
7
8
9
# /scripts/rebuildhttpdconf
...
info [rebuildhttpdconf] Missing IP for domain install.example.com, using 192.168.0.20
info [rebuildhttpdconf] Missing ServerName for domain install.example.com, using install.example.com
info [rebuildhttpdconf] Missing port for domain install.example.com, using 80
info [rebuildhttpdconf] Missing user for domain install.example.com, using nobody
info [rebuildhttpdconf] Missing owner for domain install.example.com, force lookup to root
info [rebuildhttpdconf] Missing group for domain install.example.com, using nobody
Built /etc/apache2/conf/httpd.conf OK

Hjalp dette svar dig?

Relaterede artikler

WHM Scripts
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
The dbmaptool Script
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
The servers_queue Script
Overview: This script allows you to manage the task queue system. The task queue system allows...
The auto-adjust-mysql-limits Script
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
The autossl_check Script
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...