Base de Conhecimento
The fix-web-vhost-configuration Script Imprimir este Artigo
Overview:
You can use the /usr/local/cpanel/scripts/fix-web-vhost-configuration
script to iterate through each user’s web virtual host configuration files and remove excess alias names. Certain historical errors in cPanel & WHM make it possible for discrepancies to exist between what the system expects and the actual configuration.
-
You must run this script as the
root
user. -
The system automatically runs the
/usr/local/cpanel/scripts/fix-web-vhost-configuration
script when you upgrade major versions of cPanel & WHM.
This script performs the following actions:
--dry-run
argument, the script will not delete or add any domains form the web virtual host configuration files.-
Identify any unrecognized alias domains.
-
Delete the following unrecognized alias domains from the web virtual host configuration files:
-
Active service subdomains -
cpanel.example.com
-
www
subdomains of active service subdomains -www.cpanel.example.com
-
www
subdomains of any expected alias -www.mail.example.com
Note:This will ignore other unrecognized alias domains
-
-
Identify and add any missing alias domains.
Run the script
To run this script on the command line, use the following format:
/usr/local/cpanel/scripts/fix-web-vhost-configuration [arguments]
Options
Use the following options with this script:
Options | Description | Example |
---|---|---|
--user |
Required - Update the web virtual host configuration files of the user that you specify.
Note:
You must pass either the
user flag or the all-users flag, but not both. |
--user=username |
--all-users |
Required - Update the web virtual host configuration files for all users.
Note:
You must pass either the
user flag or the all-users flag, but not both. |
--all-users |
--dry-run |
Identify, but do not delete or add any alias domains in the user’s web virtual host configuration files. | --dry-run |
--help |
Display a help message. | --help |
Example
For example, the following command removes the excess alias name from the username
cPanel user’s web virtual host configuration files:
/usr/local/cpanel/scripts/fix-web-vhost-configuration --user=username
Output
This script’s output could resemble the following example:
|
|
Esta resposta foi útil?
Artigos Relacionados
Overview: The cPanel & WHM installation process adds important scripts to your server’s...
Overview: You can use the /usr/local/cpanel/bin/dbmaptool script to grant ownership of databases...
Overview: This script allows you to manage the task queue system. The task queue system allows...
Overview: The /usr/local/cpanel/scripts/auto-adjust-mysql-limits script updates MySQL®...
Overview: The /usr/local/cpanel/bin/autossl_check script allows you to manually check the SSL...