- Plesk 12.5 for Linux
- Plesk 10.4 for Linux
- Plesk Onyx for Linux
- Plesk 11.0 for Linux
- Plesk 11.5 for Linux
- Plesk 12.0 for Linux
- Plesk 10.3 for Linux
- Plesk 10.x and below for Linux
The solution for Parallels Plesk 11.5 is described in article #213948625 .
The web server configuration cannot be built. The following error is displayed in the Parallels Plesk interface:
New files of configuration for Apache web server were not built due to errors in configuration templates: mkdir: cannot create directory `/var/www/vhosts/domain1.test/conf': No such file or directory
This problem occurs when a virtual host directory has been removed, but a domain/subdomain is still set up to have physical hosting in Plesk. As a result, the utility
fails to create configuration files.
Download, unpack, make executable, and run the script attached to this article:
# wget http://kb.plesk.com/Attachments/kcs-5698/fix_vhosts.sh.zip
# unzip fix_vhosts.sh.zip
# chmod +x fix_vhosts.sh
The script will find all domains with enabled physical hosting that have missing virtual host directories and recreate the basic virtual host structure for these domains. If the sub-directories "conf" or "statistics/logs" are missing, they will also be recreated with the correct permissions/ownerships.
The web server configuration will then be rebuilt from scratch using the method provided in KB article #213927145 .
Example of script output:
sub1.domain.test: no physical hosting definition in database.
customer1.tld: creating basic virtual host structure: ok
customer1.tld: creating 'conf' directory: ok
customer1.tld: creating 'logs' directory: ok
Rebuilding Apache configuration: