Bobcares

WeSupport

Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.55 minutes in January 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

New files of configuration for Apache – How to fix Plesk error

by | Jan 30, 2021

Stuck with Error New Files of Configuration for Apache? We can help you with it.

Our customers often report this error seen while accessing the home page in their Plesk control panel.

Causes of this error can vary from PHP memory issue or any database error or even when the mailman package not installed.

It can also be due to the records in the Plesk database containing information about non-existent configuration files or old error messages.

Error: New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating configuration.

Here at Bobcares, we often handle this Plesk error for our customers using the Plesk panel.

Today let’s see how our Support Techs fix this error for our customers as a part of Server Management Services.

Methods to fix Error: New files of configuration for Apache

We will see how our Support Techs fix this Plesk error which is caused due to some of the following causes.

1. Mailman package is not installed

At times while reconfiguring the domain, we will get the following error.

# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
No valid mailman bindir detected

From the error, we understand it is due to a missing mailman package.

Following are the steps to fix this issue:

1. First we will download and install the mailman package from http://autoinstall.plesk.com

2. Then we will remove all entries from the ‘Configurations’ table of the ‘psa’ database with the following command:

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"delete from Configurations"

3. After that we will remove all ‘Include’ records from configuration files and other contents from the directory below:

# sed -i /Include/d /usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/vhosts_bootstrap.conf&& sed -i /include/d /usr/local/psa/admin/conf/nginx_vhosts_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/webmail_horde_bootstrap.conf&& sed -i /Include/d /usr/local/psa/admin/conf/webmail_atmail_bootstrap.conf&& sed -i /Include/d /etc/httpd/conf.d/zz010_psa_httpd.conf&& rm -f /usr/local/psa/admin/conf/generated/*

4. Finally with the following command we will reconfigure and fix this issue.

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

 

2. Database related error

We can check to confirm if it is a DB related error using the following command:

mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -Nse"select * from Configurations where status='error' G"

If we see any error similar to the below one we can conclude that there is a database error.

status: error
description: Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = SQLSTATE[HY093]: Invalid parameter number: no parameters were bound

Following are the steps to fix this:

1. First, we will log in to MySQL and connect to the psa database with the following command:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> connect psa

2. Now we will run the below query to find the objectIDs with an Error status.

mysql> select objectId from Configurations where status='error';
+----------+
| objectId |
+----------+
| 8 |
+----------+
1 row in set (0.00 sec)

3. We will get the ‘objectId’ from the above results with which we will find out the domain which is using this ID.

mysql> select id,name,parentDomainId from domains where id=8;
+----+------------------+----------------+
| id | name | parentDomainId |
+----+------------------+----------------+
| 8 | hostingtrainer.com | 0 |
+----+------------------+----------------+
1 row in set (0.00 sec)

4. After this we will find the subscription ID for the specified domain using the following command:

mysql> select id, object_id from Subscriptions where object_id=8
+----+-----------+
| id | object_id |
+----+-----------+
| 5 | 8 |
+----+-----------+
1 row in set (0.00 sec)

5. Next we will check whether this subscription has any entries in the apsContext table.

mysql> SELECT `apsContexts`.* FROM `apsContexts` AS `apsContexts` WHERE (`pleskType` = 'hosting' AND `pleskId` =8 );
+----+-----------+---------+-------+----------------+
| id | pleskType | pleskId | ssl | subscriptionId |
+----+-----------+---------+-------+----------------+
| 5 | hosting | 8 | false | 0 |
+----+-----------+---------+-------+----------------+
1 row in set (0.00 sec)

6. If we find the subscription ID to be different from the Plesk ID we can correct it.

mysql> update apsContexts set subscriptionId=5 where pleskId=8;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

7. Finally with the following command we will reconfigure and fix this issue.

/usr/local/psa/admin/bin/httpdmng --reconfigure-all

 

3. PHP memory issue

We can check the PHP memory issue in the  ‘/var/log/sw-cp-server/error_log

PHP Fatal error: allowed memory size of 134217728 bytes exhausted (tried to allocate 7680 bytes)

This error usually It is because Plesk is unable to process or function with the current PHP memory limit.

Following are the steps to fix this issue:

To fix this, we can set the PHP ‘memory_limit‘ parameter in ‘/usr/local/psa/admin/conf/php.ini’ to a higher value than the current value.

 

4. The Plesk database contains records about non-existent configuration files or old error messages.

We can either remove old information via the Plesk interface or via an SSH connection.

Steps to follow for removing the old information via Plesk interface:

1. First Log in to Plesk.

2. Go to Tools & Settings and take Webserver Configurations Troubleshooter.

3. Click the “v” button on the right side and set the Status search filter to Error from the drop-down menu.

We can do any of the following to fix the errors:

a) Select all the broken configuration files and click Rebuild.

b) If configuration files do not get repaired, we can select them all and click Remove.

c) After this we will click Check configuration to ensure that there are no broken configuration files left.

Steps to follow for removing the old information via SSH connection:

1. First, connect to the Plesk server via SSH.

2. For removing broken configuration entries from the Plesk database we will use the following command:

plesk db "delete from Configurations where status <> 'ok'\G"

3. After that we will validate configuration files using the following command:

plesk repair web -validate-configuration

4. In case if any errors are found, we will fix them with the following command:

plesk repair web -y

Alternatively, we can use the Plesk ‘fix_vhosts’ script given below:

# 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 missing virtual host directories and re-create the basic virtual host structure for them. If any sub-directories “conf” or “statistics/logs” are missing, it will be recreated as well with proper permissions/ownerships.

[Need any further assistance in fixing Plesk related errors? – We can help you]

 

Conclusion

To conclude, we saw the various causes for error: new files of configuration for apache. Also, we saw the steps that our Support Engineers follow to fix this Plesk error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

GET UP TO 25% OFF

Plesk Support

Spend time on your business, not on your servers.

Managing a server is time consuming. Whether you are an expert or a newbie, that is time you could use to focus on your product or service. Leave your server management & end-user tech support to us, and use that time to focus on the growth and success of your business.

TALK TO USOr click here to learn more.

Categories:

Tags: