• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk failed to regenerate web server configuration

javii

New Pleskian
Hi, I am having new problems with Plesk 10 again.

For some reason I got this email today:

Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 491 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf: Could not open configuration file /var/www/vhosts/hiddendomain.com/conf/13295616400.22587600_httpd.include: No such file or directory

But the domain hiddendomain.com does not exist now in Plesk, I tried to do httpdmng reconfigure-all but didnt help. If I create hiddendomain.com again in Plesk, I can see two lines in /usr/local/psa/admin/conf/vhosts_bootstrap.conf referring to the same domain, and If I delete the domain the again it doesnt delete both lines, it only delete last line.

I tried also to delete the line in /usr/local/psa/admin/conf/vhosts_bootstrap.conf but Plesk creates it again.
The workaround I have used is create a blank file named /var/www/vhosts/hiddendomain.com/conf/13295616400.22587600_httpd.include. Now Plesk is happy with two lines referring the same domain, but it will break If I delete the domain again.

How can I solve this?

Where Plesk get the list of domains to regenerate the file /usr/local/psa/admin/conf/vhosts_bootstrap.conf?

Any help would be appreciated.

Best regards
 
Thank you burnleyvic, I have tried that, but I still see two lines referring the same domain in the /usr/local/psa/admin/conf/vhosts_bootstrap.conf file:

Include '/var/www/vhosts/domain.com/conf/13295616400.22587600_httpd.include'
Include '/var/www/vhosts/domain.com/conf/13297330020.69600600_httpd.include'

Anyone kwows where Plesk get the list of domains to regenerate vhosts_bootstrap.conf file? I have looked at psa database but everything seems fine there.

Best regards.
 
They're stale records, for some reason. Backup your psa database and remove those, then reconfigure. IMPORTANT: Extra caution is required when working with the database directly.

mysqldump -u admin -p`cat /etc/psa/.psa.shadow` psa > psa_`date +%Y%m%d-%H%M%S`_backup.sql

mysql -u admin -p`cat /etc/psa/.psa.shadow` psa

mysql> SELECT * FROM Configurations WHERE file='/var/www/vhosts/domain.com/conf/13295616400.22587600_httpd.include';

mysql> DELETE FROM Configurations WHERE file='/var/www/vhosts/domain.com/conf/13295616400.22587600_httpd.include';

\q

httpdmng –reconfigure-all
 
You are my hero! That solved the problem. Thank you very much.

However I still have a little problem, everytime I log into Plesk i see a red box with this text:

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.

If I click there, I see a green box with:

Information: Web server reconfiguration is completed: New Apache configuration files were successfully built and applied.

But the red box do not disapear. Is there any way to get rid of this?

Best regards
 
You might still have some misconfigured domains

mysql -u admin -p`cat /etc/psa/.psa.shadow` psa
mysql> SELECT * FROM Configurations WHERE status!='ok';

Post the output here.
 
Thank you burnleyvic again, I found some misconfigured domains on that table, I deleted them and the red message went away.

Best regards.
 
Back
Top