• 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

New files of configuration for Apache web server were not built due to errors in conf

Eric Pretorious

Regular Pleskian
There's a new warning on my Plesk homepage:

New files of configuration for Apache web server were not built due to errors in configuration templates: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 5 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf.Lbglc6: Could not open configuration file /var/www/vhosts/example.com/conf/13850218520.82415400_httpd.include: No such file or directory. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating broken configuration or click here to retry generating of all configurations.

Clicking the first link -- "...so please check the e-mail, fix the errors, and click here to retry generating broken configuration..." -- fails with the error message...

Error: Web server reconfiguration failed: New configuration was not built.

The detailed error message that was e-mailed to [me] tells me that Plesk was...

Unable to generate the web server configuration file on the host <www.example.net> because of the following errors:

httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 5 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf.Lbglc6: Could not open configuration file /var/www/vhosts/example.com/conf/13850218520.82415400_httpd.include: No such file or directory

Please resolve the errors in web server configuration templates and generate the file again.

Checking each of the files mentioned in the warning...

  • line 221 of /etc/httpd/conf/httpd.conf,
  • Line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf,
  • Line 5 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf.Lbglc, and
  • the directory /var/www/vhosts/example.com/conf
Doesn't reveal any errors except for the absence of the file /var/www/vhosts/example.com/conf/13850218520.82415400_httpd.include.

What can I do to fix this error without "generating of all configurations"?

OS: CentOS 6.4 (x86_64)
Panel version: 11.0.9 Update #60
 
Last edited:
If you don't want to regenerate the vhosts, then do what the error tells you to do!

- Resolve all the respective syntax errors and
- Create the missing files ...
 
Checking each of the files mentioned in the warning... Doesn't reveal any errors except for the absence of the file /var/www/vhosts/example.com/conf/13850218520.82415400_httpd.include.

If you don't want to regenerate the vhosts, then do what the error tells you to do!

- Resolve all the respective syntax errors and
- Create the missing files ...

Abdi:

Please re-read my post. I've cited the relevant text for your convenience.
 
The file: /etc/httpd/conf.d/zz010_psa_httpd.conf has references (includes) of several other files, did you also look at each of them?

Rebuilding of these vhosts could save you alot of time (you would spend looking for errors)
 
What can I do to fix this error without "generating of all configurations"?

Rebuilding of these vhosts could save you alot of time (you would spend looking for errors)

Please re-read my post. I've cited the relevant text for your convenience.

The file: /etc/httpd/conf.d/zz010_psa_httpd.conf has references (includes) of several other files, did you also look at each of them?

Line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf is the line that Plesk complained about so that's the line that I read.

Line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf simply pulls-in the the two vhosts_bootstrap.conf* files in /usr/local/psa/admin/conf. i.e.,

Code:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
Include '/usr/local/psa/admin/conf/generated/13805872910.63355600_server.include'
Include '/usr/local/psa/admin/conf/generated/13805872910.63355600_horde.include'
[B]Include '/usr/local/psa/admin/conf/vhosts_bootstrap.conf*'[/B]
 
Last edited:
One possible reason that the target vhost configuration file was not created might be an seLinux issue. If seLinux is ENABLED on the Plesk server, then check the "/var/log/audit/audit.log" file(s) for AVC entries related to the target vhost configuration file and/or its directory. If there are "permission denied" entries that match the file or directory, then you may need to change the seLinux file context for the target directory. If this is the case, then it may be better to change/correct the file context for the entire vhost. MAKE SURE that if you do this, that you use a proper file context value! Check for other vhost hierarchies and see if their vhost config directory has a different file context than the one referred to in the warning e-mail. "chcon -R -t .... ....." is what you will most likely need to use in this situation. DON'T BLINDLY go changing things, however, hoping to "find a hit" that works, or you just might make things worse, and don't disable seLinux if this is the issue - fix the problem. Also note that every time you have an Apache configuration error, there is a possibility that if the Apache/HTTPD daemons are stopped/go down - that Apache/HTTPD may NOT be able to restart until the configuration issue is resolved!
 
did you already tried the httpdmng --reconfigure-all command?

No, Henning:

I haven't tried the httpdmng command. The command seems pretty straight-forward...
Code:
[root@www conf]# /usr/local/psa/admin/bin/httpdmng --help

Usage: httpdmng <command>
    Available commands:
    --reconfigure-all                  Reconfigures web server for all
                                       domains
    --reconfigure-server               Reconfigures server-wide webserver
                                       configuration parameters
    --reconfigure-domain <domain_name> Reconfigures web server for the
                                       specified domain
    --reconfigure-domains <domain_name>[,<domain_name>[,<domain_name>[,...]]]
                                       Reconfigures web server for the
                                       specified domains
    --reconfigure-batch <batch-source> Reconfigures web server in batch mode
    --check-configurations             Check configuration files existence
    --help or -h                       Displays help page

    Available options:
    -no-restart                        Don't restart webserver

Version: 11.0.9_build110120608.16 os_CentOS 6

I'll give it a whirl and let you know how it works [rebuilding the single domain].
 
No, Henning:

I haven't tried the httpdmng command. The command seems pretty straight-forward... I'll give it a whirl and let you know how it works [rebuilding the single domain].

The httpdmng command returned the same error that the Panel returned:
[root@www conf]# /usr/local/psa/admin/bin/httpdmng --reconfigure-domain example.com
2013-11-26T00:52:25+00:00 ERR (3): Apache config (13854271400.68479500) generation failed: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 5 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf.Lbglc6: Could not open configuration file /var/www/vhosts/example.com/conf/13850218520.82415400_httpd.include: No such file or directory

httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 5 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf.Lbglc6: Could not open configuration file /var/www/vhosts/example.com/conf/13850218520.82415400_httpd.include: No such file or directory

I've confirmed that...

  1. the directory /var/www/vhosts/example.com/conf has the same permissions as all of the other conf directories and
  2. the file 13850218520.82415400_httpd.include is missing from the /var/www/vhosts/example.com/conf directory.
Ideas? Suggestions?
 
Last edited:
Hi Eric,

just to clue it out. Do you have any other files in the conf-directory? What about copying the latest file to the filename you are getting as file not found?

Kind regards
Henning
 
just to clue it out. Do you have any other files in the conf-directory? What about copying the latest file to the filename you are getting as file not found?

Hi, Henning:

There are eighteen files in /var/www/vhosts/example.com/conf:
Code:
[root@www cron.d]# ls /var/www/vhosts/[COLOR="#0000FF"]example.com[/COLOR]/conf
13600909610.33075300_nginx.conf                13603602370.64824400_nginx.conf     13852811380.88374200_nginx.conf     13854271400.68479500_httpd.include
13600909640.63450300_httpd.include             13603602380.25605500_httpd.include  13853673930.17239000_nginx.conf     last_httpd.include
13600909640.63450300_httpd_ip_default.include  13604388570.13675400_nginx.conf     13853673940.45585900_httpd.include  last_httpd_ip_default.include
13601189740.73220200_nginx.conf                13604388570.91567900_httpd.include  13853674040.60743800_nginx.conf     last_nginx.conf
13601189750.31259100_httpd.include             13851433980.38490000_httpd.include  13853674050.46588800_httpd.include  siteapp.d
Copying any of the *_httpd.include files to 13850218520.82415400_httpd.include just causes Plesk to carp the same error message about a different domain:

Code:
[root@www conf]# find .  -maxdepth 1 -type f | wc -l
18

[root@www conf]# ll *_httpd.include
-rw-r----- 1 root apache  338 Feb  5  2013 13600909640.63450300_httpd.include
-rw-r----- 1 root apache 7253 Feb  6  2013 13601189750.31259100_httpd.include
-rw-r----- 1 root apache 7253 Feb  8  2013 13603602380.25605500_httpd.include
-rw-r----- 1 root apache 7253 Feb  9  2013 13604388570.91567900_httpd.include
-rw-r----- 1 root apache 7339 Nov 22 18:03 13851433980.38490000_httpd.include
-rw-r----- 1 root apache  257 Nov 25 08:16 13853673940.45585900_httpd.include
-rw-r----- 1 root apache 7339 Nov 25 08:16 13853674050.46588800_httpd.include
-rw-r----- 1 root apache 7339 Nov 26 00:52 13854271400.68479500_httpd.include
lrwxrwxrwx 1 root root     34 Nov 26 00:52 last_httpd.include -> 13854271400.68479500_httpd.include

[root@www conf]# cp 13851433980.38490000_httpd.include 13850218520.82415400_httpd.include

[root@www conf]# /usr/local/psa/admin/bin/httpdmng --reconfigure-domain [COLOR="#0000FF"]example.com[/COLOR]
2013-11-26T01:47:36+00:00 ERR (3): Apache config (13854304520.20989600) generation failed: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 6 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf.Lbglc6: Could not open configuration file /var/www/vhosts/[COLOR="#FF0000"]example.net[/COLOR]/conf/13850222680.89657400_httpd.include: No such file or directory

httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 6 of /usr/local/psa/admin/conf/vhosts_bootstrap.conf.Lbglc6: Could not open configuration file /var/www/vhosts/[COLOR="#FF0000"]example.net[/COLOR]/conf/13850222680.89657400_httpd.include: No such file or directory

Taking the same approach with example.net produces the same result. i.e., It just causes Plesk to carp the same error message about a different domain (e.g., example.edu).

Ideas? Suggestions?
 
Last edited:
Hi Eric,

do you have many domains installed? Or would it be possible to do this step?
Another option would be to remove the lines out of the bootstrap.

It seems to be, that the configuration should have been generated but an error came up.
Sadly, this is the first time of such an error, but I think, that we should get this error being solved through copying the file(s).

Hopefully you don't have hundreds of domains installed.

I've checked the situation on my servers and I can confirm, that normally the files are correctly build ...

Maybe this Helps too: http://kb.parallels.com/115587
 
Last edited:

Thanks, Henning for all of your help!

  1. The Plesk Webserver Configuration Troubleshooter reports that there were 255 entries and 148 of those had a status of "error".
  2. Using the KB articles that the troubleshooting extension provided, I was able to address the root cause and fix the problem.

    From the KB article Apache fails to regenerate its configuration files due to incorrect vhosts_bootstrap.conf files:

    Symptoms
    Apache fails to regenerate its configuration files:

    Cause
    This may happen if some corrupted or outdated vhosts_bootstrap.conf* files are present in the /usr/local/psa/admin/conf directory.

    Therefore, if you have some invalid bootstrapper configuration files, such as vhosts_bootstrap.conf.bak, they will also be included.

    Resolution
    The issue will be fixed in Parallels Plesk Panel version 11.1, for which a new Knowledgebase article will be created. You may subscribe to new articles on Parallels Plesk Panel products if you wish to receive notifications about their creation.

    Workaround
    Move all files matching the /usr/local/psa/admin/conf/vhosts_bootstrap.conf* pattern, except for the main /usr/local/psa/admin/conf/vhosts_bootstrap.conf file, to another location.
Removing the file vhosts_bootstrap.conf.Lbglc6 from /usr/local/psa/admin/conf solved the problem and now the Plesk Webserver Configuration Troubleshooter reports that there are zero errors!

Thanks, again!
 
Last edited:
Back
Top