New files of configuration for Apache web server were not built due to errors in configuration templates: mkdir: cannot create directory in Plesk

http://kb.parallels.com/en/115979

“New files of configuration for Apache web server were not built due to errors in configuration templates: mkdir: cannot create directory”
Article ID: 115979
Created On: Apr 17, 2013
Last Review: Jun 27, 2013
Views:
APPLIES TO:
Parallels Plesk Panel 11.0 for Linux
Parallels Plesk Panel 10.4 for Linux/Unix
Symptoms
Web server configuration cannot be built. The following error is displayed in the Parallels Plesk Panel 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
Cause
This problem happens when a virtual host directory has been removed, but a domain/subdomain is still set up to have physical hosting in Parallels Plesk Panel. As a result, the utility httpdmng fails to create configuration files.
Resolution
Download, unpack, make executable, and run the script attached to the article:
# wget http://kb.parallels.com/Attachments/24430/Attachments/fix_vhosts.sh.zip
# unzip fix_vhosts.sh.zip
# chmod +x fix_vhosts.sh
# ./fix_vhosts.sh
The script will find all domains with enabled physical hosting that have missing virtual host directories and re-create the basic virtual host structure for these domains. If the sub-directories “conf” or “statistics/logs” are missing, they will be recreated as well with proper permissions/ownerships.
Web server configuration will then be rebuilt from scratch using the method provided in KB article #111605.
Example of script output:
# ./fix_vhosts.sh
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:
ok

Advertisements
Previous Post
Leave a comment

Leave your opinion

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: