• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Unable to generate the web server configuration file

ErikLo

New Pleskian
After installing Wordpress or Joomla I get the error:

Unable to generate the web server configuration file on the host <click2it.nl> because of the following errors:

Template_Exception: httpd: Syntax error on line 223 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/click2it.nl.conf: Permission denied

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0

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

Anyone any idea how to resolve this?

Thanks in advance!
 
Hello,

Try to rebuild httpd conf file on your server

Code:
/usr/local/psa/admin/bin/httpdmng --reconfigure-all
 
What is line 8 in /etc/httpd/conf.d/zz010_psa_httpd.conf ?

What is permissions on file /etc/httpd/conf/plesk.conf.d/vhosts/click2it.nl.conf ?
 
With the After the Rebuild All with the Webserver Configurations Troubleshooter I get:

Error: Can not reconfigure webserver configurations: Unable to execute httpdmng: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-domains [1] => dvoot.com,dvoot.nl,mijnwebtekst.nl,click2it.nl,strandtent.nl,strandtent.com,click2it.nl,strandtent.nl,strandtent.com ) Details: 2013-12-14T15:05:43+01:00 ERR (3) [util_exec]: proc_close() failed 2013-12-14T15:05:45+01:00 ERR (3) [util_exec]: proc_close() failed 2013-12-14T15:05:45+01:00 ERR (3) [panel]: Apache config (13870299410.90669900) generation failed: Template_Exception: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/mijnwebtekst.nl.conf: Permission denied file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php line: 68 code: 0 httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/mijnwebtekst.nl.conf: Permission denied
 
What do following command show?
getenforce
ls -la /etc/httpd/conf/plesk.conf.d/vhosts/mijnwebtekst.nl.conf
 
I get

lrwxrwxrwx. 1 root root 75 Dec 14 15:07 /etc/httpd/conf/plesk.conf.d/vhosts/mijnwebtekst.nl.conf -> /var/www/vhosts/system/mijnwebtekst.nl.conf/13870300460.85268900_httpd.conf
 
What about getenforce? Try to disable selinux then reconfigure configs and return selinux state.
Code:
[root@a10-52-59-230 ~]# SELINUX=`getenforce`
[root@a10-52-59-230 ~]# echo $SELINUX
Enforcing
[root@a10-52-59-230 ~]# setenforce 0
[root@a10-52-59-230 ~]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
[root@a10-52-59-230 ~]# setenforce $SELINUX
[root@a10-52-59-230 ~]# getenforce 
Enforcing
 
I did that but no positive result
I get an email:

Unable to generate the web server configuration file on the host <click2it.nl> because of the following errors:

Template_Exception: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/mijnwebtekst.nl.conf: Permission denied

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0

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


And in Plesk I get:

New configuration files for the Apache web server were not created due to the errors in configuration templates: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/mijnwebtekst.nl.conf: Permission denied . The error message containing the detailed error descriptions was sent to you by e-mail. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.
 
Could you send me the output of command above or print here if it's not too big?
And output of following command too:
ls -laZ /var/www/vhosts/system/mijnwebtekst.nl.conf
 
Hereby the output of the command above:

Code:
[root@click2it elodeweges]# SELINUX=`getenforce`
[root@click2it elodeweges]# echo $SELINUX
Enforcing
[root@click2it elodeweges]# setenforce 0
[root@click2it elodeweges]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
[root@click2it elodeweges]# setenforce $SELINUX
[root@click2it elodeweges]# getenforce
Enforcing
[root@click2it elodeweges]#

Ans the LS command gives:

Code:
[root@click2it elodeweges]# ls -laZ /var/www/vhosts/system/mijnwebtekst.nl.conf
ls: cannot access /var/www/vhosts/system/mijnwebtekst.nl.conf: No such file or directory
 
With the command above I get:

Code:
[root@click2it elodeweges]# SELINUX=`getenforce`
[root@click2it elodeweges]# echo $SELINUX
Enforcing
[root@click2it elodeweges]# setenforce 0
[root@click2it elodeweges]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
[root@click2it elodeweges]# setenforce $SELINUX
[root@click2it elodeweges]# getenforce
Enforcing
[root@click2it elodeweges]#


And the ls command gives:

Code:
[root@click2it system]# ls -laZ /var/www/vhosts/system/mijnwebtekst.nl.conf
ls: cannot access /var/www/vhosts/system/mijnwebtekst.nl.conf: No such file or directory
[root@click2it system]#
 
With the command above I get:

Code:
[root@click2it elodeweges]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
[root@click2it elodeweges]# setenforce $SELINUX
Empty output of httpdmng utility means that all configurations were successfully reconfigured.

Does Plesk still show the reconfiguration error?
 
Last edited:
Yes, it does:

New configuration files for the Apache web server were not created due to the errors in configuration templates: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 8 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/mijnwebtekst.nl.conf: Permission denied . The error message containing the detailed error descriptions was sent to you by e-mail. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

Schermafbeelding 2013-12-16 om 11.36.46.png
 
The error in panel means that you had had the issue before reconfiguration in console. Sometimes when the erroneous object is deleted the error is not removed from the database.
You can workaround it with Webserver Configuration Checker:
1. In the extension on Configurations tab select only erroneous configuration by clicking "Show Errors" button.
2. Select all erroneous configuration and delete it with "Remove" button.
3. (Optional)Then you can rebuild all configurations with "Rebuild All" button to make you sure that issue disappeared and it was not the selinux issue.
 
BTW, were there no warnings on the Checker tab of Webserver Configurations Troubleshooter?
 
Try with disabled selinux:
1. [root@click2it elodeweges]# setenforce 0
2. Then remove erroneous configuration in Webserver Configuration Troubleshooter.
3. "Rebuild All" in Webserver Configuration Troubleshooter.
 
There is only one more problem.
Some sites with website hosting do forward to another website hosted on the same Plesk Panel.
For example: I setup a Wordpress site at mijnwebtekst.nl but now it is forwarded to dvoot.com.
 
Back
Top