The following error is displayed on the Plesk homepage when trying to rebuild web server configuration files:
New configuration files for the Apache web server were not created due to the errors in configuration templates: mkdir: cannot create directory `/var/www/vhosts/system/example.com/conf': No such file or directory mktemp: cannot create temp file /var/www/vhosts/system/example.com/conf/httpd.conf.XXXXXX: No such file or directory Can not create temporary file. The error message containing the detailed error descriptions was sent to you by e-mail. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.
When trying to create configuration files from console, the following error will be shown:
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all mkdir: cannot create directory `/var/www/vhosts/system/example.com/conf': No such file or directory mktemp: failed to create file via template `/var/www/vhosts/system/example.com/conf/httpd.conf.XXXXXX': No such file or directory Can not create temporary file
The virtual host structure is corrupted/not upgraded and some directories are missing.
Repair vhosts structure:
# /usr/local/psa/bin/repair --update-vhosts-structure
If command doesn't create missing directories from the error automatically, create them manually. For example:
# mkdir -p /home/vhosts/system/domain.tld/conf
Re-create web server configuration files:
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all
--reconfigure-alloption can cause a significant downtime during its execution in case of big number of hosted domains, especially if rebuilding is being failed. So, it is recommended to rebuild web server configuration files by bunches:
# /usr/local/psa/admin/bin/httpdmng --reconfigure-domains <domain_name>[,<domain_name>[,<domain_name>[,...]]]
For more information about usabage of
httpdmngcheck it with
For Plesk versions prior to 11.5, the solution is described in the article #115979.