• 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

11.5 upgrade > new domain : Unable to generate the web server configuration file

JasperV

Basic Pleskian
When upgrading from 11.0.9 to 11.5.30 #update 7 yesterday, the Parallels Plesk Panel Pre-Upgrade Checker gave me a message. I did not give it any further notice because the upgrade went fine after that and completed successfully. No problems with existing domain and their configuration.

Today I created a new Customer successfully and then created a new domain for this customer.

The pleskPanel is stating the following:

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/3dconcepten.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.

After that I received the following e-mail:

Subject: Unable to configure a web server on the host <host>

Unable to generate the web server configuration file on the host <host> 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/3dconcepten.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.


How can I resolve this issue?
 
Last edited:
Searching the forum some more... I ended up by http://kb.parallels.com/115587

The Plesk Webserver Configuration Troubleshooter showed me 1 warning:

[2013-07-29 02:14:39][INFO] ==> STEP 10: Checking for SElinux state...
[2013-07-29 02:14:39][WARNING] SElinux in enforced mode is detected. It might lead to failures in configs regeneration because of invalid contexts.
Please check http://kb.parallels.com/115299 for details.
[2013-07-29 02:14:39][INFO] Result: Warning


I tried to apply kb 115299, but it seems this solution is for Plesk 11.0 only because it says: The problem described in this KB article has been completely fixed since Parallels Plesk Panel 11.5 (see release notes).

Applying the solution anyway, failed in step # 2: semanage unknown command.

Step 3. Apply context type changes:
# restorecon -Rv /var/www/vhosts/

And step 4. Reconfigure webserver configurations:
# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

however solved the Permission denied on the webser .conf files.

The [WARNING] SElinux in enforced mode is detected. It might lead to failures in configs regeneration because of invalid contexts. still remains. Is this serious? Will there be configuration problems in the future?
 
The [WARNING] SElinux in enforced mode is detected. It might lead to failures in configs regeneration because of invalid contexts. still remains. Is this serious? Will there be configuration problems in the future?

Yes, it might lead to problems in the future. You might want to switch SELinux into permissive mode or disable it altogether if you don't need it. Best way to check whether you'll have problems in the future is to create another similar test domain (i.e., if it was a subdomain, create subdomain with similar path to httpdocs, etc.). If you encounter another failure please compare SELinux contexts (using ls -lZ command) for "good" and "bad" configs and post them here.

Also check that Plesk SELinux policy is installed:

# semodule -l | grep plesk
 
Hi Nikolay,

Thanks for your reply.

Also check that Plesk SELinux policy is installed:

# semodule -l | grep plesk

SELinux policy for Plesk 11.5.30 is installed.

I created a test domain similar to the domain causing the error on the configuration file. All seems good now. No error.

I guess that the restorecon and the httpdmng --reconfigure-all did do the trick.

I still wonder though how this happened. Can you explain this to me?
 
I still wonder though how this happened. Can you explain this to me?

I'm not sure. Apparently something in the middle had wrong SELinux context. If you want to understand it, you should pull relevant log records from audit.log.
 
I have same problem:


[root@myserver ~]# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] =>
mydomain1.com,mydomain2.com,mydomain3.com
)

Details: 2013-07-31T11:40:29+02:00 ERR (3) [util_exec]: proc_close() failed
2013-07-31T11:40:32+02:00 ERR (3) [panel]: Apache config (13752636270.33624700) generation failed: Template_Exception: Syntax error on line 78 of /etc/httpd/conf/plesk.conf.d/vhosts/mydomain1.com.conf:
FcgidIOTimeout must be greater than 0

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0
Syntax error on line 78 of /etc/httpd/conf/plesk.conf.d/vhosts/mydomain1.com.conf:
FcgidIOTimeout must be greater than 0
 
Had the same problem as the topic starter (also after an update from 11.0 to 11.5). The restorecon and reconfigure command seems to fix the problem with newly created websites!
 
Back
Top